Skip to content

Instantly share code, notes, and snippets.

@adrianparvino
Created May 1, 2018 23:31
Show Gist options
  • Save adrianparvino/f00b1a1d0ef88779efe4b56bfc5dbd5f to your computer and use it in GitHub Desktop.
Save adrianparvino/f00b1a1d0ef88779efe4b56bfc5dbd5f to your computer and use it in GitHub Desktop.
.file "crt1.c"
.text
.globl _start
.type _start, @function
_start:
.LFB0:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
subq $48, %rsp
#APP
# 13 "crt/x86_64/crt1.c" 1
xor %rbp , %rbp
mov %rdx , %rax
pop %rdi
mov %rsp , %rsi
andq $-32 , %rsp
mov $_fini, %rdx
mov $_init, %rcx
mov $main , %r8
# 0 "" 2
#NO_APP
movq %r8, -8(%rbp)
movq %rdi, -16(%rbp)
movq %rsi, -24(%rbp)
movq %rcx, -32(%rbp)
movq %rdx, -40(%rbp)
movq %rax, -48(%rbp)
movq -48(%rbp), %r8
movq -40(%rbp), %rdi
movq -32(%rbp), %rcx
movq -24(%rbp), %rdx
movq -16(%rbp), %rsi
movq -8(%rbp), %rax
movq %r8, %r9
movq %rdi, %r8
movq %rax, %rdi
movl $0, %eax
call __libc_start_main
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size _start, .-_start
.ident "GCC: (GNU) 7.3.0"
.section .note.GNU-stack,"",@progbits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment