boot1_arch.h 806 B

1234567891011121314151617181920212223242526272829303132
  1. /* Any assmbly language/system dependent hacks needed to setup boot1.c so it
  2. * will work as expected and cope with whatever platform specific wierdness is
  3. * needed for this architecture. See arm/boot1_arch.h for an example of what
  4. * can be done.
  5. */
  6. asm("
  7. .text
  8. .globl _dl_boot
  9. _dl_boot:
  10. .set noreorder
  11. bltzal $0, 0f
  12. nop
  13. 0: .cpload $31
  14. .set reorder
  15. # i386 ABI book says that the first entry of GOT holds
  16. # the address of the dynamic structure. Though MIPS ABI
  17. # doesn't say nothing about this, I emulate this here.
  18. la $4, _DYNAMIC
  19. # Subtract OFFSET_GP_GOT
  20. sw $4, -0x7ff0($28)
  21. move $4, $29
  22. la $8, coff
  23. bltzal $8, coff
  24. coff: subu $8, $31, $8
  25. la $25, _dl_boot2
  26. addu $25, $8
  27. jalr $25
  28. ");
  29. #define _dl_boot _dl_boot2
  30. #define DL_BOOT(X) static void __attribute__ ((unused)) _dl_boot (X)