- 论坛徽章:
- 3
|
[root@Flower root]# more 8.c
#include <stdio.h>
#include <errno.h>
main()
{
printf("%d",errno);
}
[root@Flower root]# gcc -S 8.c
[root@Flower root]# more 8.s
.file "8.c"
.section .rodata
.LC0:
.string "%d"
.text
.globl main
.type main, @function
main:
pushl %ebp
movl %esp, %ebp
subl $8, %esp
andl $-16, %esp
movl $0, %eax
addl $15, %eax
addl $15, %eax
shrl $4, %eax
sall $4, %eax
subl %eax, %esp
call __errno_location
movl (%eax), %eax
movl %eax, 4(%esp)
movl $.LC0, (%esp)
call printf
leave
ret
.size main, .-main
.ident "GCC: (GNU) 4.0.2"
.section .note.GNU-stack,"",@progbits |
|