diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2019-01-25 18:52:32 -0800 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2019-01-28 10:55:04 -0800 |
commit | 75c1c971842f43157c173728e8465e1ce3c1b838 (patch) | |
tree | c2afb558416b24cbc3be6ce1a6c0dfbb3addb1a4 /gas/config | |
parent | 7054e2fff6d93e4c2b3b6d0de0d8bda72d3c3d59 (diff) | |
download | fsf-binutils-gdb-75c1c971842f43157c173728e8465e1ce3c1b838.zip fsf-binutils-gdb-75c1c971842f43157c173728e8465e1ce3c1b838.tar.gz fsf-binutils-gdb-75c1c971842f43157c173728e8465e1ce3c1b838.tar.bz2 |
xtensa: gas: don't keep relocations for constants
xtensa gas chokes on 8/16 bit data entries representing constant symbols
because it leaves BFD_RELOC_8/BFD_RELOC_16 fixups for which xtensa BFD
cannot emit relocations. Resolve fixups for constant symbols in
md_apply_fix.
gas/
2019-01-28 Max Filippov <jcmvbkbc@gmail.com>
* config/tc-xtensa.c (md_apply_fix): Mark fixups for constant
symbols as done in md_apply_fix.
* testsuite/gas/all/forward.d: Don't XFAIL for xtensa.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-xtensa.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c index 23bb2d2..3bdbbc9 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c @@ -6019,6 +6019,12 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg) val = *valP; fixP->fx_done = 1; } + else if (S_GET_SEGMENT (fixP->fx_addsy) == absolute_section) + { + val = S_GET_VALUE (fixP->fx_addsy) + fixP->fx_offset; + *valP = val; + fixP->fx_done = 1; + } /* fall through */ case BFD_RELOC_XTENSA_PLT: |