.file "test.c"
.section .rodata
.LC1:
.string "456"
.LC0:
.string "123456789"
.text
.globl foo
.type foo, @function
foo:
pushl %ebp
movl %esp, %ebp
subl $16, %esp
movl .LC0, %eax ;将1234复制到栈中
movl %eax, -14(%ebp)
movl .LC0+4, %eax ;将5678复制到栈中
movl %eax, -10(%ebp)
movzwl .LC0+8, %eax ;将9\0复制到栈中
movw %ax, -6(%ebp)
movl $.LC1, -4(%ebp)
movb $88, -14(%ebp)
movl -4(%ebp), %eax
movb $89, (%eax)
leave
ret
.size foo, .-foo
.globl main
.type main, @function
main:
leal 4(%esp), %ecx
andl $-16, %esp
pushl -4(%ecx)
pushl %ebp
movl %esp, %ebp
pushl %ecx
call foo
movl $0, %eax
popl %ecx
popl %ebp
leal -4(%ecx), %esp
ret
.size main, .-main
.ident "GCC: (GNU) 4.1.2 20070626 (Red Hat 4.1.2-14)"
.section .note.GNU-stack,"",@progbits
|