Use signed data type for R_XTENSA_DIFF* relocation offsets.
R_XTENSA_DIFF relocation offsets are in fact signed. Treat them as such. Add testcase that examines ld behaviour on R_XTENSA_DIFF relocation changing sign during relaxation. 2014-05-02 Volodymyr Arbatov <arbatov@cadence.com> David Weatherford <weath@cadence.com> Max Filippov <jcmvbkbc@gmail.com> bfd/ * elf32-xtensa.c (relax_section): treat R_XTENSA_DIFF* relocations as signed. gas/ * config/tc-xtensa.c (md_apply_fix): mark BFD_RELOC_XTENSA_DIFF* fixups as signed. ld/testsuite/ * ld-xtensa/diff_overflow.exp, * ld-xtensa/diff_overflow1.s, * ld-xtensa/diff_overflow2.s: Add test for DIFF* relocation signedness and overflow checking.
Showing
- bfd/ChangeLog 7 additions, 0 deletionsbfd/ChangeLog
- bfd/elf32-xtensa.c 17 additions, 15 deletionsbfd/elf32-xtensa.c
- gas/ChangeLog 5 additions, 0 deletionsgas/ChangeLog
- gas/config/tc-xtensa.c 3 additions, 0 deletionsgas/config/tc-xtensa.c
- ld/testsuite/ChangeLog 6 additions, 0 deletionsld/testsuite/ChangeLog
- ld/testsuite/ld-xtensa/diff_overflow.exp 45 additions, 0 deletionsld/testsuite/ld-xtensa/diff_overflow.exp
- ld/testsuite/ld-xtensa/diff_overflow1.s 27 additions, 0 deletionsld/testsuite/ld-xtensa/diff_overflow1.s
- ld/testsuite/ld-xtensa/diff_overflow2.s 22 additions, 0 deletionsld/testsuite/ld-xtensa/diff_overflow2.s
Loading
Please register or sign in to comment