aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-s390/pltoffset-1.s
diff options
context:
space:
mode:
authorAndreas Krebbel <krebbel@linux.vnet.ibm.com>2016-06-07 16:45:15 +0200
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>2016-06-07 16:47:10 +0200
commit161db2790500827b74ef835ebe515dce04021316 (patch)
tree1c29a0c7865c5be502dc3ff90409ebf6d6063700 /ld/testsuite/ld-s390/pltoffset-1.s
parent14b57c7c6a53c747a8819fed3da858eae4195a0e (diff)
downloadgdb-161db2790500827b74ef835ebe515dce04021316.zip
gdb-161db2790500827b74ef835ebe515dce04021316.tar.gz
gdb-161db2790500827b74ef835ebe515dce04021316.tar.bz2
Fix PLT first entry GOT operand calculation.
Embedding the .plt section in another revealed a bug in the way the larl operand of the first magic plt entry is being calculated. Fixed with the attached patch. bfd/ChangeLog: * elf64-s390.c (elf_s390_finish_dynamic_sections): Subtract plt section offset when calculation the larl operand in the first PLT entry. ld/ChangeLog: * testsuite/ld-s390/pltoffset-1.dd: New test. * testsuite/ld-s390/pltoffset-1.ld: New test. * testsuite/ld-s390/pltoffset-1.s: New test. * testsuite/ld-s390/s390.exp: Run new test.
Diffstat (limited to 'ld/testsuite/ld-s390/pltoffset-1.s')
-rw-r--r--ld/testsuite/ld-s390/pltoffset-1.s12
1 files changed, 12 insertions, 0 deletions
diff --git a/ld/testsuite/ld-s390/pltoffset-1.s b/ld/testsuite/ld-s390/pltoffset-1.s
new file mode 100644
index 0000000..4c81523
--- /dev/null
+++ b/ld/testsuite/ld-s390/pltoffset-1.s
@@ -0,0 +1,12 @@
+ .file "hello.c"
+.text
+ .align 8
+.globl main
+ .type main, @function
+main:
+ brasl %r5,foo@PLT
+ br %r4
+ .size main, .-main
+
+.globl foo
+foo: .long 123