We should always move jump tables when requested. Previously,
we were not moving jump tables of non-simple functions in relocation
mode. That caused a bug detailed in the attached test case: in PIC
jump tables, we force jump tables to be moved, but if they are not
moved because the function is not simple, we could incorrectly update
original entries in .rodata, corrupting it under special circumstances
(see testcase).
Details
Details
- Reviewers
Amir maksfb - Group Reviewers
Restricted Project - Commits
- rG369899449226: [BOLT] Always move JTs in jump-table=move
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Move the test outside of runtime folder, make it do not depends on running a binary to check correctness. Add linkerscript to enforce binary layout.