Add a shouldAdjustVA(Section) guard on top of address update.
Update llvm-objdump file to update symbol table when --adjust-vma used.
Fixes #63203
Differential D153027
[llvm-objdump] --adjust-vma adjust symbol table HamidrezaSK on Jun 15 2023, 7:31 AM. Authored by
Details
Add a shouldAdjustVA(Section) guard on top of address update. Update llvm-objdump file to update symbol table when --adjust-vma used. Fixes #63203
Diff Detail
Event Timeline
Comment Actions As this patch is supposed to be fixing an issue in Github, please add "Fixes #63203" to your commit message for this patch.
Comment Actions Adjust the indentation symbol table test ADJUST blocks to line up with the NOADJUST blocks. Adjust the guard on top of the address update to if (SecI != O.section_end() && shouldAdjustVA(*SecI)) to protect a dereference of O.section_end(). Adjust adjust-vma test to add SHN_ABS symbol test (D153401). Comment Actions Rebased and committed in https://reviews.llvm.org/rG7b7470600c1b30d6f1acf500976e1c06e5282aa0. |
Nit: You will see in the other parts of this test that the ADJUST blocks are indented slightly to ensure they line up with the NOADJUST blocks. Please could you do the same here, to make it easier to read and compare.