RISC-V: Support GNU indirect functions.
[deliverable/binutils-gdb.git] / ld / testsuite / ld-riscv-elf / ifunc-plt-01.s
1 .text
2
3 .type foo_resolver, @function
4 foo_resolver:
5 ret
6 .size foo_resolver, .-foo_resolver
7
8 .globl foo
9 .type foo, %gnu_indirect_function
10 .set foo, foo_resolver
11
12 .globl bar
13 .type bar, @function
14 bar:
15 .L1:
16 auipc x1, %got_pcrel_hi (foo)
17 .ifdef __64_bit__
18 ld x1, %pcrel_lo (.L1) (x1)
19 .else
20 lw x1, %pcrel_lo (.L1) (x1)
21 .endif
22
23 .L2:
24 auipc x2, %pcrel_hi (foo)
25 addi x2, x2, %pcrel_lo (.L2)
26
27 call foo
28 call foo@plt
29
30 ret
31 .size bar, .-bar
This page took 0.030811 seconds and 4 git commands to generate.