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
Paths
| Differential D130073
[BOLT] Handle broken .dynsym in stripped binaries ClosedPublic Authored by nhuhuan on Jul 19 2022, 3:50 AM.
Details Summary 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. This revision is now accepted and ready to land.Jul 20 2022, 7:21 PM Closed by commit rG8eb68d92d4d0: [BOLT] Handle broken .dynsym in stripped binaries (authored by nhuhuan, committed by Amir). · Explain WhyJul 22 2022, 11:24 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 445955 bolt/lib/Rewrite/RewriteInstance.cpp
bolt/test/X86/broken_dynsym.s
|