summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-riscv-elf/ifunc-seperate-caller-pcrel.s
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-riscv-elf/ifunc-seperate-caller-pcrel.s')
-rw-r--r--ld/testsuite/ld-riscv-elf/ifunc-seperate-caller-pcrel.s14
1 files changed, 14 insertions, 0 deletions
diff --git a/ld/testsuite/ld-riscv-elf/ifunc-seperate-caller-pcrel.s b/ld/testsuite/ld-riscv-elf/ifunc-seperate-caller-pcrel.s
new file mode 100644
index 00000000000..2d29bcd121b
--- /dev/null
+++ b/ld/testsuite/ld-riscv-elf/ifunc-seperate-caller-pcrel.s
@@ -0,0 +1,14 @@
+ .text
+
+ # Call the IFUNC `foo` which is defined in the other modules.
+ .globl foo
+ .type foo, %function
+
+ .globl main
+ .type main, @function
+main:
+.L1:
+ auipc x1, %pcrel_hi (foo)
+ addi x1, x1, %pcrel_lo (.L1)
+ ret
+ .size main, .-main