1058c7532d
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.
27 lines
382 B
ArmAsm
27 lines
382 B
ArmAsm
.section .text.f0,"axG",@progbits,f0,comdat
|
|
.literal_position
|
|
.literal .L0, 0
|
|
.align 4
|
|
f0:
|
|
entry a1, 32
|
|
l32r a2, .L0
|
|
retw
|
|
|
|
.section .text
|
|
.literal_position
|
|
.global _start
|
|
_start:
|
|
entry a1, 32
|
|
retw
|
|
|
|
.section .text.f1,"axG",@progbits,f1,comdat
|
|
.literal_position
|
|
.literal .L1, 0
|
|
.literal .L2, 0
|
|
.align 4
|
|
.global f1
|
|
f1:
|
|
entry a1, 32
|
|
l32r a2, .L1
|
|
l32r a3, .L2
|
|
retw
|