Commit ba6fdb81 authored by Maksim Panchenko's avatar Maksim Panchenko
Browse files

[BOLT] Preserve original jump table relocations

Summary:
Remove relocations against internal function labels, e.g. jump table
relocations, only when overwriting them.

While reading an input file with relocations, we create internal
relocations against code references (we skip PIC relocations).
Later, when we discover jump tables, we remove corresponding relocations
with the assumption that original relocations will either be ignored or
replaced by new relocations. However, it is possible to miss some
references to the jump table, in which case the original entries will
not be ignored. While such situation is abnormal, it is still a
better/safer approach to preserve relocations if we are not replacing
them with new ones.

(cherry picked from FBD28406628)
parent 81c59d9a
Supports Markdown
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