ifunc-12.s 509 B

123456789101112131415161718192021222324
  1. .section .text.foo,"ax",@progbits
  2. .type foo, @function
  3. foo:
  4. adrp x0, :got:ifunc
  5. ldr x0, [x0, #:got_lo12:ifunc]
  6. bl ifunc
  7. adrp x0, xxx
  8. add x0, x0, :lo12:xxx
  9. ret
  10. .section .text.bar,"ax",@progbits
  11. .type bar, @function
  12. bar:
  13. .global bar
  14. ret
  15. .section .text.ifunc,"ax",@progbits
  16. .type ifunc, @gnu_indirect_function
  17. ifunc:
  18. ret
  19. .section .data.foo,"aw",@progbits
  20. xxx:
  21. .quad ifunc