Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. ([J:2]jnbek@localhost[~]% gcc -S test.c [12/03/19][17:16:04])
  2. ([J:2]jnbek@localhost[~]% gcc -S test.c -o test.s [12/03/19][17:16:07])
  3. ([J:2]jnbek@localhost[~]% cat test.s [12/03/19][17:16:18])
  4. .file "test.c"
  5. .text
  6. .section .rodata
  7. .LC0:
  8. .string "Hello World"
  9. .text
  10. .globl main
  11. .type main, @function
  12. main:
  13. .LFB0:
  14. .cfi_startproc
  15. pushq %rbp
  16. .cfi_def_cfa_offset 16
  17. .cfi_offset 6, -16
  18. movq %rsp, %rbp
  19. .cfi_def_cfa_register 6
  20. movl $.LC0, %edi
  21. call puts
  22. nop
  23. popq %rbp
  24. .cfi_def_cfa 7, 8
  25. ret
  26. .cfi_endproc
  27. .LFE0:
  28. .size main, .-main
  29. .ident "GCC: (GNU) 9.2.1 20190827 (Red Hat 9.2.1-1)"
  30. .section .note.GNU-stack,"",@progbits
  31. ([J:2]jnbek@localhost[~]% cat test.c [12/03/19][17:16:23])
  32.  
  33.  
  34. #include <stdio.h>
  35. void main (void) {
  36. printf("Hello World\n");
  37. }
  38. ([J:2]jnbek@localhost[~]% gcc -c test.s [12/03/19][17:19:16])
  39. ([J:2]jnbek@localhost[~]% ./a.out [12/03/19][17:19:18])
  40. Hello World
  41. ([J:2]jnbek@localhost[~]%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement