Strip tools cause a few symbols in .dynsym to have bad section index.
This update safely keeps such broken symbols intact.
Test Plan:
ninja check-bolt
Differential D130073
[BOLT] Handle broken .dynsym in stripped binaries nhuhuan on Jul 19 2022, 3:50 AM. Authored by
Details Strip tools cause a few symbols in .dynsym to have bad section index. Test Plan: ninja check-bolt
Diff Detail
Event TimelineComment Actions We need a test case for this fix: yaml2obj test with a dynamic symbol table with wrong (out of bounds) index. We should check that BOLT keeps this index intact. Comment Actions Note for other reviewers: we were unable to get yaml input with a broken symbol section index (yaml2obj refuses to produce an object file). So this approach (yaml2obj + llvm-strip) is the closest we were able to get. |