diff options
Diffstat (limited to 'ld/testsuite/ld-riscv-elf/ifunc-reloc-got.s')
-rw-r--r-- | ld/testsuite/ld-riscv-elf/ifunc-reloc-got.s | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ld/testsuite/ld-riscv-elf/ifunc-reloc-got.s b/ld/testsuite/ld-riscv-elf/ifunc-reloc-got.s new file mode 100644 index 00000000000..eca16d52cfd --- /dev/null +++ b/ld/testsuite/ld-riscv-elf/ifunc-reloc-got.s @@ -0,0 +1,23 @@ + .text + + .type foo_resolver, @function +foo_resolver: + ret + .size foo_resolver, .-foo_resolver + + .globl foo + .type foo, %gnu_indirect_function + .set foo, foo_resolver + + .globl bar + .type bar, @function +bar: +.L1: + auipc x1, %got_pcrel_hi (foo) +.ifdef __64_bit__ + ld x1, %pcrel_lo (.L1) (x1) +.else + lw x1, %pcrel_lo (.L1) (x1) +.endif + ret + .size bar, .-bar |