Scrt1.s 359 B

123456789101112131415161718192021222324
  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 $_GLOBAL_OFFSET_TABLE_,(%esp)
  15. pop %ebx
  16. call 1f
  17. 1: addl $[_fini-.],(%esp)
  18. call 1f
  19. 1: addl $[_init-.],(%esp)
  20. pushl %eax
  21. pushl %ecx
  22. pushl main@GOT(%ebx)
  23. call __libc_start_main@plt
  24. 1: jmp 1b