aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-arm/ifunc-13.s
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-arm/ifunc-13.s')
-rw-r--r--ld/testsuite/ld-arm/ifunc-13.s50
1 files changed, 50 insertions, 0 deletions
diff --git a/ld/testsuite/ld-arm/ifunc-13.s b/ld/testsuite/ld-arm/ifunc-13.s
new file mode 100644
index 0000000..467f06f
--- /dev/null
+++ b/ld/testsuite/ld-arm/ifunc-13.s
@@ -0,0 +1,50 @@
+ .syntax unified
+ .arch armv6t2
+
+ .macro define,name,type
+ .type \name,%gnu_indirect_function
+ \type
+\name:
+ mov pc,lr
+ .size \name,.-\name
+ .endm
+
+ .macro test_relocs,name
+ ldr r4,1f
+ ldr r4,2f
+1:
+ .word \name(GOT)
+2:
+ .word \name(GOT_PREL)
+ .endm
+
+ .global f2
+ .global f2t
+
+ .global f3
+ .hidden f3
+ .global f3t
+ .hidden f3t
+
+ define f1,.arm
+ define f3,.arm
+
+ define f1t,.thumb_func
+ define f3t,.thumb_func
+
+ .globl _start
+_start:
+ test_relocs foo
+ test_relocs f1
+ test_relocs f2
+ test_relocs f3
+ test_relocs f1t
+ test_relocs f2t
+ test_relocs f3t
+ .size _start,.-_start
+
+ .data
+foo:
+ .word 0x11223344
+ .word __irel_start
+ .word __irel_end