boot1_arch.h 428 B

1234567891011121314151617
  1. /*
  2. * This code fix the stack pointer so that the dynamic linker
  3. * can find argc, argv and auxvt (Auxillary Vector Table).
  4. */
  5. asm("" \
  6. " .text\n" \
  7. " .globl _dl_boot\n" \
  8. " .type _dl_boot,@function\n" \
  9. "_dl_boot:\n" \
  10. " move.d $sp,$r10\n" \
  11. " move.d $pc,$r9\n" \
  12. " add.d _dl_boot2 - ., $r9\n" \
  13. " jsr $r9\n" \
  14. );
  15. #define _dl_boot _dl_boot2
  16. #define LD_BOOT(X) static void * __attribute__ ((unused)) _dl_boot(X)