Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ([J:2]jnbek@localhost[~]% gcc -S test.c [12/03/19][17:16:04])
- ([J:2]jnbek@localhost[~]% gcc -S test.c -o test.s [12/03/19][17:16:07])
- ([J:2]jnbek@localhost[~]% cat test.s [12/03/19][17:16:18])
- .file "test.c"
- .text
- .section .rodata
- .LC0:
- .string "Hello World"
- .text
- .globl main
- .type main, @function
- main:
- .LFB0:
- .cfi_startproc
- pushq %rbp
- .cfi_def_cfa_offset 16
- .cfi_offset 6, -16
- movq %rsp, %rbp
- .cfi_def_cfa_register 6
- movl $.LC0, %edi
- call puts
- nop
- popq %rbp
- .cfi_def_cfa 7, 8
- ret
- .cfi_endproc
- .LFE0:
- .size main, .-main
- .ident "GCC: (GNU) 9.2.1 20190827 (Red Hat 9.2.1-1)"
- .section .note.GNU-stack,"",@progbits
- ([J:2]jnbek@localhost[~]% cat test.c [12/03/19][17:16:23])
- #include <stdio.h>
- void main (void) {
- printf("Hello World\n");
- }
- ([J:2]jnbek@localhost[~]% gcc -c test.s [12/03/19][17:19:16])
- ([J:2]jnbek@localhost[~]% ./a.out [12/03/19][17:19:18])
- Hello World
- ([J:2]jnbek@localhost[~]%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement