crt1.s 310 B

12345678910111213141516171819202122
  1. .weak _init
  2. .weak _fini
  3. .text
  4. .global _start
  5. _start:
  6. xorl %ebp,%ebp
  7. popl %ecx
  8. movl %esp,%eax
  9. andl $-16,%esp
  10. pushl %esp
  11. pushl %esp
  12. pushl %edx
  13. call 1f
  14. 1: addl $[_fini-.],(%esp)
  15. call 1f
  16. 1: addl $[_init-.],(%esp)
  17. pushl %eax
  18. pushl %ecx
  19. call 1f
  20. 1: addl $[main-.],(%esp)
  21. call __libc_start_main
  22. 1: jmp 1b