ifunc-11.s 551 B

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