Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ > cat test.c
- void foo(void)
- {
- static const char a1[6] = {'t','e','s','t','1','2'};
- bar(a1);
- static const char a2[6] = ("test12");
- bar(a2);
- return;
- }
- $ > gcc test.c -S
- $ > cat test.s
- .file "test.c"
- .text
- .globl foo
- .type foo, @function
- foo:
- .LFB0:
- .cfi_startproc
- pushq %rbp
- .cfi_def_cfa_offset 16
- movq %rsp, %rbp
- .cfi_offset 6, -16
- .cfi_def_cfa_register 6
- movl $a1.1616, %edi
- movl $0, %eax
- call bar
- movl $a2.1618, %edi
- movl $0, %eax
- call bar
- leave
- .cfi_def_cfa 7, 8
- ret
- .cfi_endproc
- .LFE0:
- .size foo, .-foo
- .section .rodata
- .type a1.1616, @object
- .size a1.1616, 6
- a1.1616:
- .byte 116
- .byte 101
- .byte 115
- .byte 116
- .byte 49
- .byte 50
- .type a2.1618, @object
- .size a2.1618, 6
- a2.1618:
- .ascii "test12"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement