crt1.S 505 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (C) 2026 Waldemar Brodkorb <wbx@uclibc-ng.org>
  3. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  4. */
  5. .text
  6. .globl _start
  7. .type _start,@function
  8. _start:
  9. /* rtld_fini */
  10. or $r9, $r4, $r0
  11. /* main */
  12. la.global $r4, main
  13. /* argc */
  14. ld.d $r5, $r3, 0
  15. /* argv */
  16. addi.d $r6, $r3, 8
  17. /* init/fini */
  18. move $r7, $r0
  19. move $r8, $r0
  20. /* stack_end */
  21. or $r10, $r3, $r0
  22. bl __uClibc_main