dl-startup.h 672 B

1234567891011121314151617181920212223242526272829303132333435
  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. bltzal $8, coff
  19. coff: subu $8, $31, $8
  20. la $25, _dl_boot2
  21. addu $25, $8
  22. jalr $25
  23. lw $4, 0($29)
  24. la $5, 4($29)
  25. sll $6, $4, 2
  26. addu $6, $6, $5
  27. addu $6, $6, 4
  28. la $7, _dl_elf_main
  29. lw $25, 0($7)
  30. jr $25
  31. ");
  32. #define _dl_boot _dl_boot2
  33. #define DL_BOOT(X) static void __attribute__ ((unused)) _dl_boot (X)