aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-arm
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-arm')
-rw-r--r--ld/testsuite/ld-arm/arm-elf.exp3
-rw-r--r--ld/testsuite/ld-arm/ifunc-gdesc.r6
-rw-r--r--ld/testsuite/ld-arm/ifunc-gdesc.s29
-rw-r--r--ld/testsuite/ld-arm/ifunc-gdesc.ver4
4 files changed, 42 insertions, 0 deletions
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index c255587..2e7e164 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -460,6 +460,9 @@ set armelftests_nonacl {
"" {long-plt-format.s}
{{objdump "-d -j .plt" long-plt-format.d}}
"long-plt-format"}
+ {"IFUNC and TLS descriptor shared library" "-shared -T arm-lib.ld --version-script=ifunc-gdesc.ver" "" "" {ifunc-gdesc.s}
+ {{objdump "-Rw" ifunc-gdesc.r}}
+ "ifunc-gdesc.so"}
}
run_ld_link_tests $armelftests_common
diff --git a/ld/testsuite/ld-arm/ifunc-gdesc.r b/ld/testsuite/ld-arm/ifunc-gdesc.r
new file mode 100644
index 0000000..a49dd2b
--- /dev/null
+++ b/ld/testsuite/ld-arm/ifunc-gdesc.r
@@ -0,0 +1,6 @@
+tmpdir/ifunc-gdesc.so: file format elf32-(big|little)arm
+DYNAMIC RELOCATION RECORDS
+OFFSET TYPE VALUE
+0000825c R_ARM_IRELATIVE \*ABS\*
+00008248 R_ARM_TLS_DESC \*ABS\*
+00008250 R_ARM_TLS_DESC \*ABS\*
diff --git a/ld/testsuite/ld-arm/ifunc-gdesc.s b/ld/testsuite/ld-arm/ifunc-gdesc.s
new file mode 100644
index 0000000..a07a5d5
--- /dev/null
+++ b/ld/testsuite/ld-arm/ifunc-gdesc.s
@@ -0,0 +1,29 @@
+
+ .arm
+
+foo:
+ bl ifunc1(PLT)
+ ldr r0,1f
+2: bl loc1(tlscall)
+ nop
+1: .word loc1(tlsdesc) + (. - 2b)
+
+ ldr r0,1f
+2: bl loc2(tlscall)
+ nop
+1: .word loc2(tlsdesc) + (. - 2b)
+
+ .type ifunc1,%gnu_indirect_function
+ .global ifunc1
+ifunc1:
+ mov pc,lr
+ .size ifunc1,.-ifunc1
+
+
+ .section .tdata,"awT",%progbits
+ .space 8
+ .type loc1, %object
+loc1: .space 4
+ .type loc2, %object
+loc2: .space 4
+
diff --git a/ld/testsuite/ld-arm/ifunc-gdesc.ver b/ld/testsuite/ld-arm/ifunc-gdesc.ver
new file mode 100644
index 0000000..a82ffc4
--- /dev/null
+++ b/ld/testsuite/ld-arm/ifunc-gdesc.ver
@@ -0,0 +1,4 @@
+{
+global: foo;
+local: *;
+}; \ No newline at end of file