1
0

crt_arch.h 669 B

1234567891011121314151617181920212223242526272829303132
  1. __asm__(
  2. ".set push\n"
  3. ".set noreorder\n"
  4. ".text \n"
  5. ".global _" START "\n"
  6. ".global " START "\n"
  7. ".global " START "_data\n"
  8. ".type _" START ", @function\n"
  9. ".type " START ", @function\n"
  10. ".type " START "_data, @function\n"
  11. "_" START ":\n"
  12. "" START ":\n"
  13. " bal 1f \n"
  14. " move $fp, $0 \n"
  15. "" START "_data: \n"
  16. " .gpword " START "_data \n"
  17. " .gpword " START "_c \n"
  18. ".weak _DYNAMIC \n"
  19. ".hidden _DYNAMIC \n"
  20. " .gpword _DYNAMIC \n"
  21. "1: lw $gp, 0($ra) \n"
  22. " subu $gp, $ra, $gp \n"
  23. " move $4, $sp \n"
  24. " lw $5, 8($ra) \n"
  25. " addu $5, $5, $gp \n"
  26. " lw $25, 4($ra) \n"
  27. " addu $25, $25, $gp \n"
  28. " and $sp, $sp, -8 \n"
  29. " jalr $25 \n"
  30. " subu $sp, $sp, 16 \n"
  31. ".set pop \n"
  32. );