dl-startup.h 707 B

1234567891011121314151617181920212223242526272829303132333435363738
  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.
  4. */
  5. asm("
  6. .text
  7. .globl _dl_boot
  8. _dl_boot:
  9. .set noreorder
  10. bltzal $0, 0f
  11. nop
  12. 0: .cpload $31
  13. .set reorder
  14. la $4, _DYNAMIC
  15. sw $4, -0x7ff0($28)
  16. move $4, $29
  17. la $8, coff
  18. .set noreorder
  19. bltzal $0, coff
  20. nop
  21. coff: subu $8, $31, $8
  22. .set reorder
  23. la $25, _dl_boot2
  24. addu $25, $8
  25. jalr $25
  26. lw $4, 0($29)
  27. la $5, 4($29)
  28. sll $6, $4, 2
  29. addu $6, $6, $5
  30. addu $6, $6, 4
  31. la $7, _dl_elf_main
  32. lw $25, 0($7)
  33. jr $25
  34. ");
  35. #define _dl_boot _dl_boot2
  36. #define DL_BOOT(X) static void __attribute__ ((unused)) _dl_boot (X)