Commit 6f5762df authored by Samuel Huang's avatar Samuel Huang Committed by Commit Bot

[SuperSize] Skip symbols with '.L_MergedGlobals' prefix when parsing LLD linker maps.

For 32-bit ARM LLD builds (LTO and non-LTO), the linker map files can
have thousands of symbols with '.L_MergedGlobals' prefix. These symbols
obscure shadow symbols with more informative name.

This CL fixes the problem by making liner map parser  skip symbols with
these prefixes.

Bug: 905329
Change-Id: I2e72b566e17f025bdf147551bd5b569764e0ec16
Reviewed-on: https://chromium-review.googlesource.com/c/1338227Reviewed-by: default avatarEric Stevenson <estevenson@chromium.org>
Reviewed-by: default avatarSamuel Huang <huangs@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608543}
parent af7de424
...@@ -419,6 +419,10 @@ class MapFileParserLld(object): ...@@ -419,6 +419,10 @@ class MapFileParserLld(object):
sym_maker.cur_sym.object_path = cur_obj sym_maker.cur_sym.object_path = cur_obj
elif indent_size == 16: elif indent_size == 16:
# Ignore anything with '.L_MergedGlobals' prefix. This seems to only
# happen for ARM (32-bit) builds.
if tok.startswith('.L_MergedGlobals'):
continue
# If multiple entries exist, take the first on that reports a size. # If multiple entries exist, take the first on that reports a size.
# Zero-length symbols look like "$t.4", "$d.5". # Zero-length symbols look like "$t.4", "$d.5".
if size and not sym_maker.cur_sym.full_name: if size and not sym_maker.cur_sym.full_name:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment