resolve.S 839 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Linux dynamic resolving code for AVR32. Fixes up the GOT entry as
  3. * indicated in register r12 and jumps to the resolved address.
  4. *
  5. * This file is subject to the terms and conditions of the GNU Lesser General
  6. * Public License. See the file "COPYING.LIB" in the main directory of this
  7. * archive for more details.
  8. *
  9. * Copyright (C) 2004-2007 Atmel Corporation
  10. */
  11. #define ip r5
  12. .text
  13. .global _dl_linux_resolve
  14. .type _dl_linux_resolve,@function
  15. _dl_linux_resolve:
  16. /* The PLT code pushed r8 for us. It contains the address of this
  17. function's GOT entry, that is entry 0. ip contains the address
  18. of the GOT entry of the function we wanted to call. */
  19. stm --sp, r9-r12, lr
  20. mov r11, r8
  21. sub r12, ip, r8
  22. rcall _dl_linux_resolver
  23. mov ip, r12
  24. popm r8-r12,lr
  25. mov pc, ip
  26. .size _dl_linux_resolve, . - _dl_linux_resolve