aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ld-s390/gotreloc_31-no-pie-1.dd13
-rw-r--r--ld/testsuite/ld-s390/gotreloc_64-no-pie-1.dd12
-rw-r--r--ld/testsuite/ld-s390/s390.exp10
3 files changed, 35 insertions, 0 deletions
diff --git a/ld/testsuite/ld-s390/gotreloc_31-no-pie-1.dd b/ld/testsuite/ld-s390/gotreloc_31-no-pie-1.dd
new file mode 100644
index 0000000..2e0d2cd
--- /dev/null
+++ b/ld/testsuite/ld-s390/gotreloc_31-no-pie-1.dd
@@ -0,0 +1,13 @@
+
+tmpdir/gotreloc_31-1: file format elf32-s390
+
+Disassembly of section .text:
+
+.* <foo>:
+.*: c4 18 00 00 08 1e [ ]*lgrl %r1,4010b0 <_GLOBAL_OFFSET_TABLE_\+0x14>
+.*: e3 10 c0 14 00 04 [ ]*lg %r1,20\(%r12\)
+.*: c0 10 00 00 08 1a [ ]*larl %r1,4010b4 <bar>
+.*: 58 10 c0 14 [ ]*l %r1,20\(%r12\)
+.*: c0 10 00 00 08 15 [ ]*larl %r1,4010b4 <bar>
+.*: c4 18 00 00 08 0e [ ]*lgrl %r1,4010ac <_GLOBAL_OFFSET_TABLE_\+0x10>
+.*: c4 18 00 00 08 09 [ ]*lgrl %r1,4010a8 <_GLOBAL_OFFSET_TABLE_\+0xc>
diff --git a/ld/testsuite/ld-s390/gotreloc_64-no-pie-1.dd b/ld/testsuite/ld-s390/gotreloc_64-no-pie-1.dd
new file mode 100644
index 0000000..751b7a8
--- /dev/null
+++ b/ld/testsuite/ld-s390/gotreloc_64-no-pie-1.dd
@@ -0,0 +1,12 @@
+tmpdir/gotreloc_64-1: file format elf64-s390
+
+Disassembly of section .text:
+
+.* <foo>:
+.*: c0 10 00 00 08 2c [ ]*larl %r1,1001108 <bar>
+.*: c0 10 00 00 08 29 [ ]*larl %r1,1001108 <bar>
+.*: c4 1d 00 00 08 22 [ ]*lrl %r1,1001100 <_GLOBAL_OFFSET_TABLE_\+0x28>
+.*: 58 10 c0 28 [ ]*l %r1,40\(%r12\)
+.*: e3 10 c0 28 00 58 [ ]*ly %r1,40\(%r12\)
+.*: c4 18 00 00 08 16 [ ]*lgrl %r1,10010f8 <_GLOBAL_OFFSET_TABLE_\+0x20>
+.*: c4 18 00 00 08 0f [ ]*lgrl %r1,10010f0 <_GLOBAL_OFFSET_TABLE_\+0x18>
diff --git a/ld/testsuite/ld-s390/s390.exp b/ld/testsuite/ld-s390/s390.exp
index 6b97b6c..eb9ea35 100644
--- a/ld/testsuite/ld-s390/s390.exp
+++ b/ld/testsuite/ld-s390/s390.exp
@@ -54,6 +54,11 @@ set s390tests {
"-m31" {gotreloc-1.s}
{{objdump -dzrj.text gotreloc_31-1.dd}}
"gotreloc_31-1"}
+ {"GOT: no-pie symbol address load from got to larl"
+ "-shared -melf_s390 --no-pie --hash-style=sysv --version-script=gotreloc-1.ver" ""
+ "-m31" {gotreloc-1.s}
+ {{objdump -dzrj.text gotreloc_31-no-pie-1.dd}}
+ "gotreloc_31-1"}
}
set s390xtests {
@@ -80,6 +85,11 @@ set s390xtests {
"-m64" {gotreloc-1.s}
{{objdump -dzrj.text gotreloc_64-relro-1.dd}}
"gotreloc_64-1"}
+ {"GOT: no-pie symbol address load from got to larl"
+ "-shared -melf64_s390 --no-pie --hash-style=sysv --version-script=gotreloc-1.ver" ""
+ "-m64" {gotreloc-1.s}
+ {{objdump -dzrj.text gotreloc_64-no-pie-1.dd}}
+ "gotreloc_64-1"}
{"PLT: offset test"
"-shared -m elf64_s390 -dT pltoffset-1.ld --no-error-rwx-segments" ""
"-m64" {pltoffset-1.s}