crt1.S 579 B

123456789101112131415161718192021
  1. .text
  2. .globl _start
  3. .type _start,@function
  4. .type main,@function
  5. .type __uClibc_main,@function
  6. _start:
  7. mvi fp, 0 /* clear fp */
  8. mvhi r1, hi(main) /* main */
  9. ori r1, r1, lo(main)
  10. lw r2, (sp+0) /* argc */
  11. addi r3, sp, 4 /* argv */
  12. mvhi r4, hi(_init) /* app_init */
  13. ori r4, r4, lo(_init)
  14. mvhi r5, hi(_fini) /* app_fini */
  15. ori r5, r5, lo(_fini)
  16. mvi r6, 0 /* rtld_fini */
  17. mv r7, sp /* stack_end */
  18. calli __uClibc_main