Advertisement
Guest User

Untitled

a guest
Jul 4th, 2013
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. $ > cat test.c
  2. void foo(void)
  3. {
  4. static const char a1[6] = {'t','e','s','t','1','2'};
  5. bar(a1);
  6. static const char a2[6] = ("test12");
  7. bar(a2);
  8. return;
  9. }
  10. $ > gcc test.c -S
  11. $ > cat test.s
  12. .file "test.c"
  13. .text
  14. .globl foo
  15. .type foo, @function
  16. foo:
  17. .LFB0:
  18. .cfi_startproc
  19. pushq %rbp
  20. .cfi_def_cfa_offset 16
  21. movq %rsp, %rbp
  22. .cfi_offset 6, -16
  23. .cfi_def_cfa_register 6
  24. movl $a1.1616, %edi
  25. movl $0, %eax
  26. call bar
  27. movl $a2.1618, %edi
  28. movl $0, %eax
  29. call bar
  30. leave
  31. .cfi_def_cfa 7, 8
  32. ret
  33. .cfi_endproc
  34. .LFE0:
  35. .size foo, .-foo
  36. .section .rodata
  37. .type a1.1616, @object
  38. .size a1.1616, 6
  39. a1.1616:
  40. .byte 116
  41. .byte 101
  42. .byte 115
  43. .byte 116
  44. .byte 49
  45. .byte 50
  46. .type a2.1618, @object
  47. .size a2.1618, 6
  48. a2.1618:
  49. .ascii "test12"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement