linux学习-AT&T
时间:2010-11-15 来源:fxcser
test1.c
#include "stdio.h"
int main()
{
return 0;
}
gcc -S test1.c -o test.s
代码
.file "test1.c"
.text
.globl main
.type main, @function
main:
leal 4(%esp), %ecx
andl $-16, %esp
pushl -4(%ecx)
pushl %ebp
movl %esp, %ebp
pushl %ecx
movl $0, %eax
popl %ecx
popl %ebp
leal -4(%ecx), %esp
ret
.size main, .-main
.ident "GCC: (GNU) 4.1.1 20061011 (Red Hat 4.1.1-30)"
.section .note.GNU-stack,"",@progbits
AT&A语法和intel系列汇编语言有差别,以后要慢慢啃
相关阅读 更多 +