xtensa: fix signedness of gas relocations
authorMax Filippov <jcmvbkbc@gmail.com>
Tue, 2 Feb 2016 14:11:38 +0000 (17:11 +0300)
committerMax Filippov <jcmvbkbc@gmail.com>
Wed, 3 Feb 2016 17:44:57 +0000 (20:44 +0300)
commitea173078d2c0c1af13a8b315ca187ffa4d00cd66
tree2dff54ce68447dd4d78c34d6f85bc38861770df7
parent0cb4071ef9e10f703220f5e731141bf438aca16e
xtensa: fix signedness of gas relocations

Change 1058c7532d0b "Use signed data type for R_XTENSA_DIFF* relocation
offsets." changed signedness of BFD_RELOC_XTENSA_DIFF* relocations
substituted for BFD_RELOC_*. This made it impossible to encode arbitrary
8-, 16- and 32-bit values, which broke e.g. debug info encoding by .loc
directive. Revert this part and add test.

gas/
2016-02-03  Max Filippov  <jcmvbkbc@gmail.com>
* config/tc-xtensa.c (md_apply_fix): Mark BFD_RELOC_XTENSA_DIFF*
substitutions for BFD_RELOC_* as unsigned.
* gas/testsuite/gas/xtensa/all.exp: Add loc to list of xtensa
tests.
* gas/testsuite/gas/xtensa/loc.d: New file: loc test result
patterns.
* gas/testsuite/gas/xtensa/loc.s: New file: loc test.
gas/ChangeLog
gas/config/tc-xtensa.c
gas/testsuite/gas/xtensa/all.exp
gas/testsuite/gas/xtensa/loc.d [new file with mode: 0644]
gas/testsuite/gas/xtensa/loc.s [new file with mode: 0644]