resolve.S 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* This code is used in dl-runtime.c to call the `fixup' function
  2. and then redirect to the address it returns. */
  3. /* We assume that R3 contain relocation offset and R4 contains
  4. link_map (_DYNAMIC). This must be consistent with the JUMP_SLOT
  5. layout generated by binutils. */
  6. /* Based on glibc 2.3.6, dl-machine.h */
  7. /*
  8. The GNU C Library is free software; you can redistribute it and/or
  9. modify it under the terms of the GNU Lesser General Public
  10. License as published by the Free Software Foundation; either
  11. version 2.1 of the License, or (at your option) any later version.
  12. The GNU C Library is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. Lesser General Public License for more details.
  16. You should have received a copy of the GNU Lesser General Public
  17. License along with the GNU C Library; if not, write to the Free
  18. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  19. 02111-1307 USA. */
  20. .text
  21. .align 4
  22. .globl _dl_linux_resolver
  23. .globl _dl_linux_resolve
  24. .type _dl_linux_resolve,@function
  25. _dl_linux_resolve:
  26. addik r1,r1,-40
  27. swi r5,r1,12
  28. swi r6,r1,16
  29. swi r7,r1,20
  30. swi r8,r1,24
  31. swi r9,r1,28
  32. swi r10,r1,32
  33. swi r15,r1,0
  34. addk r5,r0,r4
  35. brlid r15, _dl_linux_resolver
  36. addk r6,r0,r3; /* delay slot */
  37. lwi r10,r1,32
  38. lwi r9,r1,28
  39. lwi r8,r1,24
  40. lwi r7,r1,20
  41. lwi r6,r1,16
  42. lwi r5,r1,12
  43. lwi r15,r1,0
  44. brad r3
  45. addik r1,r1,40; /* delay slot */
  46. .size _dl_linux_resolve, . - _dl_linux_resolve