|
发表于 2022-5-25 16:04:57
|
显示全部楼层
- .file "x.c"
- .text
- .section .text$_Z6printfPKcz,"x"
- .linkonce discard
- .globl __Z6printfPKcz
- .def __Z6printfPKcz; .scl 2; .type 32; .endef
- __Z6printfPKcz:
- pushl %ebp
- movl %esp, %ebp
- pushl %ebx
- subl $36, %esp
- leal 12(%ebp), %eax
- movl %eax, -16(%ebp)
- movl -16(%ebp), %ebx
- movl $1, (%esp)
- movl __imp____acrt_iob_func, %eax
- call *%eax
- movl %ebx, 8(%esp)
- movl 8(%ebp), %edx
- movl %edx, 4(%esp)
- movl %eax, (%esp)
- call ___mingw_vfprintf
- movl %eax, -12(%ebp)
- movl -12(%ebp), %eax
- movl -4(%ebp), %ebx
- leave
- ret
- .def ___main; .scl 2; .type 32; .endef
- .section .rdata,"dr"
- LC0:
- .ascii "OK\12\0"
- .text
- .globl _main
- .def _main; .scl 2; .type 32; .endef
- _main:
- pushl %ebp
- movl %esp, %ebp
- andl $-16, %esp
- subl $16, %esp
- call ___main
- movl $LC0, (%esp)
- call __Z6printfPKcz
- movl $0, %eax
- leave
- ret
- .ident "GCC: (GNU) 12.1.0"
- .def ___mingw_vfprintf; .scl 2; .type 32; .endef
复制代码
这是对应的汇编代码,你自己能从中找到这两个常量吗? |
|