Scrt1.s 349 B

123456789101112131415161718192021222324
  1. .weak _init
  2. .weak _fini
  3. .text
  4. .global _start
  5. _start:
  6. xor %ebp,%ebp
  7. pop %ecx
  8. mov %esp,%eax
  9. and $-16,%esp
  10. push %esp
  11. push %esp
  12. push %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. push %eax
  21. push %ecx
  22. push main@GOT(%ebx)
  23. call __libc_start_main@plt
  24. 1: jmp 1b