[SuperSize] For Thin-LTO, deduce object_path from cache objects for .L.ref.tmp.

Thin-LTO builds produce many (~3000 for Chrome) .L.ref.tmp symbols.
SuperSize could not find |object_path| for them because:
* The linker .map file points to thinlto-cache filenames (|thin_obj|).
* ".L.ref.tmp" has high population, so name matching done in later nm
  step won't help.

This CL associates .L.ref.tmp symbols with other symbols that share the
same |thin_obj|, and attempts to deduce |object_path| if there is no
ambiguity. Details:
* In linker_map_parser.py, extract |address| -> |thin_obj|, and return
  the map.
* In demangle.py, pass the map until after nm gets called to assign
  |object_paths| to regular symbols.
* Add DeduceObjectPathsFromThinMap() that takes |address| -> |thin_obj|
  map, computes |thin_obj| -> |object_paths|, and assigns |object_path|
  to .L.ref.tmp symbols if no ambiguity arise, i.e., when |thin_obj| is
  associated with a unique |object_path|.

For Chrome, this change causes about 30% of .L.ref.tmp symbols to gain
|object_path|.

Bug: 923936
Change-Id: I1864e764924d8e45ca5cb44d0ed7d0f73bec13ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1500781
Commit-Queue: Samuel Huang <huangs@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637605}
3 files changed