Commit a7a18639 authored by Egor Pasko's avatar Egor Pasko Committed by Commit Bot

Orderfile: exclude thumb thunks from warning

The orderfile bot currently produces a warning like this:
WARNING:root:2540 symbols repeated with multiple offsets:
 __ThumbV7PILongThunk__lala 26256476 38958560
 __ThumbV7PILongThunk__tada 26232216 38911480
...
// 10 examples, to avoid expanding the log a lot

It is expected that multi-jump thunks would be duplicated, and we
suspect they would have the same symbol name.

This change makes the warning to ignore such cases in order to leave
space for more suspicious cases.

Bug: 893981
Change-Id: I9e1ad0f1e0786c1d12d7490c7a597c7d9344b8a6
Reviewed-on: https://chromium-review.googlesource.com/c/1331395Reviewed-by: default avatarMatthew Cary <mattcary@chromium.org>
Commit-Queue: Egor Pasko <pasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607228}
parent 1623ca39
......@@ -161,7 +161,12 @@ def _SymbolInfosFromStream(objdump_lines):
for line in objdump_lines:
symbol_info = _FromObjdumpLine(line.rstrip('\n'))
if symbol_info is not None:
name_to_offsets[symbol_info.name].append(symbol_info.offset)
# On ARM the LLD linker inserts pseudo-functions (thunks) that allow
# jumping distances farther than 16 MiB. Such thunks are known to often
# reside on multiple offsets, they are not instrumented and hence they do
# not reach the orderfiles. Exclude the thunk symbols from the warning.
if not symbol_info.name.startswith('__ThumbV7PILongThunk_'):
name_to_offsets[symbol_info.name].append(symbol_info.offset)
symbol_infos.append(symbol_info)
repeated_symbols = filter(lambda s: len(name_to_offsets[s]) > 1,
......
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