1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
.section .text .global _start _start: #Setup start of stack frame xorq %rbp, %rbp pushq %rbp pushq %rbp movq %rsp, %rbp #Save arguments passed to main pushq %rdi pushq %rsi #Setup libc and call global constructors #Call main call main #Exit movq %rax, %rdi call exit .size _start, . - _start