diff options
author | Volodymyr Arbatov <arbatov@cadence.com> | 2013-05-06 09:43:21 -0800 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2014-05-08 01:55:41 +0400 |
commit | 1058c7532d0b012ac329219264ddad59049fb6e6 (patch) | |
tree | e8157b82f9c24e689593040445ee60ba6a4b939b /gas | |
parent | e59bc75b6546db04b0f3e1d760567f83ffc801f3 (diff) | |
download | gdb-1058c7532d0b012ac329219264ddad59049fb6e6.zip gdb-1058c7532d0b012ac329219264ddad59049fb6e6.tar.gz gdb-1058c7532d0b012ac329219264ddad59049fb6e6.tar.bz2 |
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.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-xtensa.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index bc2b740..0c0d191 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2014-05-02 Max Filippov <jcmvbkbc@gmail.com> + + * config/tc-xtensa.c (md_apply_fix): mark BFD_RELOC_XTENSA_DIFF* + fixups as signed. + 2014-05-07 Andrew Bennett <andrew.bennett@imgtec.com> * tc-mips.c (ISA_SUPPORTS_MIPS16E): Add mips32r3, mips32r5, mips64r3 diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c index 58ace38..7547c0a0 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c @@ -5867,12 +5867,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg) { case BFD_RELOC_8: fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8; + fixP->fx_signed = 1; break; case BFD_RELOC_16: fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF16; + fixP->fx_signed = 1; break; case BFD_RELOC_32: fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF32; + fixP->fx_signed = 1; break; default: break; |