如何编译GCC生成的asm?
我正在玩一些ASM代码,有什么东西在困扰着我。
我编译这个:
#include int main(int argc, char** argv){ printf("Hello World\n"); return 0; }
用gcc file.c -S -o file.S生成一个很好的asm代码:
.cstring LC0: .ascii "Hello World\0" .text .globl _main _main: LFB3: pushq %rbp LCFI0: movq %rsp, %rbp LCFI1: subq $16, %rsp LCFI2: movl %edi, -4(%rbp) movq %rsi, -16(%rbp) leaq LC0(%rip), %rdi call _puts movl $0, %eax leave ret LFE3: .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support EH_frame1: .set L$set$0,LECIE1-LSCIE1 .long L$set$0 LSCIE1: .long 0x0 .byte 0x1 .ascii "zR\0" .byte 0x1 .byte 0x78 .byte 0x10 .byte 0x1 .byte 0x10 .byte 0xc .byte 0x7 .byte 0x8 .byte 0x90 .byte 0x1 .align 3 LECIE1: .globl _main.eh _main.eh: LSFDE1: .set L$set$1,LEFDE1-LASFDE1 .long L$set$1 LASFDE1: .long LASFDE1-EH_frame1 .quad LFB3-. .set L$set$2,LFE3-LFB3 .quad L$set$2 .byte 0x0 .by