|
发表于 2004-10-7 17:47:24
|
显示全部楼层
下面是手工生成的:
- .file "x.c"
- .section .rodata
- .LC0:
- .string "Hello, world!\n"
- .text
- .globl x
- .type x, @function
- x:
- pushl %ebp
- movl %esp, %ebp
- subl $8, %esp
- movl $.LC0, (%esp)
- call printf
- movl $0, %eax
- leave
- ret
- .size x, .-x
- .section .note.GNU-stack,"",@progbits
- .ident "GCC: (GNU) 3.3.4 (Debian 1:3.3.4-13)"
复制代码
下面是自动生成的:- .file "x2.c"
- .section .rodata
- .LC0:
- .string "Hello, world!\n"
- .text
- .globl main
- .type main, @function
- main:
- pushl %ebp
- movl %esp, %ebp
- subl $8, %esp
- andl $-16, %esp
- movl $0, %eax
- subl %eax, %esp
- movl $.LC0, (%esp)
- call printf
- movl $0, %eax
- leave
- ret
- .size main, .-main
- .section .note.GNU-stack,"",@progbits
- .ident "GCC: (GNU) 3.3.4 (Debian 1:3.3.4-13)"
复制代码 |
|