|
发表于 2020-2-7 20:42:56
|
显示全部楼层
- #include <stdio.h>
- int main(void)
- {
- static unsigned char arr[] = {1, 2, 3, 4, 5};
- return 0;
- }
- void test(void)
- {
- static unsigned char arr[] = {11, 22, 33, 44, 55};
- }
复制代码
- .file "main.c"
- .text
- .def __main; .scl 2; .type 32; .endef
- .globl main
- .def main; .scl 2; .type 32; .endef
- .seh_proc main
- main:
- pushq %rbp
- .seh_pushreg %rbp
- movq %rsp, %rbp
- .seh_setframe %rbp, 0
- subq $32, %rsp
- .seh_stackalloc 32
- .seh_endprologue
- call __main
- movl $0, %eax
- addq $32, %rsp
- popq %rbp
- ret
- .seh_endproc
- .globl test
- .def test; .scl 2; .type 32; .endef
- .seh_proc test
- test:
- pushq %rbp
- .seh_pushreg %rbp
- movq %rsp, %rbp
- .seh_setframe %rbp, 0
- .seh_endprologue
- nop
- popq %rbp
- ret
- .seh_endproc
- .data
- arr.2979:
- .byte 1
- .byte 2
- .byte 3
- .byte 4
- .byte 5
- arr.2983:
- .byte 11
- .byte 22
- .byte 33
- .byte 44
- .byte 55
- .ident "GCC: (GNU) 7.4.0"
复制代码 |
|