aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorAndreas Krebbel <krebbel@linux.ibm.com>2023-07-03 19:51:51 +0200
committerAndreas Krebbel <krebbel@linux.ibm.com>2023-07-03 19:52:02 +0200
commitd32e20f0bf7dcafd712e532e1274f64f613088e6 (patch)
tree66ecfe821b115877fd8fdc33a8be12b0e1e3b9d1 /gas/testsuite
parent9dbbe5c948f5adcf7097339337db74d5548b63d0 (diff)
downloadgdb-d32e20f0bf7dcafd712e532e1274f64f613088e6.zip
gdb-d32e20f0bf7dcafd712e532e1274f64f613088e6.tar.gz
gdb-d32e20f0bf7dcafd712e532e1274f64f613088e6.tar.bz2
IBM Z: Fix pcrel relocs for symA-symB expressions
The code in md_apply_fix which tries to deduce from the operand type which reloc to apply currently does the wrong thing for absolute relocs which have been re-written by fixup_segment as pc-relative to implement a subtraction of a local and an external symbol. In all these cases we wrongly emit an absolute reloc because we ignore the fx_pcrel flag in md_apply_fix. However, only for the last one we actually support a pc relative relocation of the proper size and can implement it accordingly. For the other 3 we have to issue an error. foo: cli 0(%r2),undef-foo la %r2,undef-foo(%r2) lay %r2,undef-foo(%r2) lhi %r2,undef-foo
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/s390/esa-reloc.d2
1 files changed, 1 insertions, 1 deletions
diff --git a/gas/testsuite/gas/s390/esa-reloc.d b/gas/testsuite/gas/s390/esa-reloc.d
index c9da928..0b13cb6 100644
--- a/gas/testsuite/gas/s390/esa-reloc.d
+++ b/gas/testsuite/gas/s390/esa-reloc.d
@@ -23,7 +23,7 @@ Disassembly of section .text:
22: a7 08 00 00 [ ]*lhi %r0,0
[ ]*24: R_390_GOT16 test_R_390_GOT16
26: a7 08 00 00 [ ]*lhi %r0,0
-[ ]*28: R_390_16 test_R_390_PC16\+0x26
+[ ]*28: R_390_PC16 test_R_390_PC16\+0x28
2a: a7 e5 00 00 [ ]*bras %r14,2a <foo\+0x2a>
[ ]*2c: R_390_PC16DBL test_R_390_PC16DBL\+0x2
2e: a7 e5 00 00 [ ]*bras %r14,2e <foo\+0x2e>