Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # linux
- $ gcc -xc -S -o - -<<<'int main() { puts("Hello, world!"); }' -std=c99 -include stdio.h -masm=intel -m32 -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables
- .file ""
- .intel_syntax noprefix
- .section .rodata
- .LC0:
- .string "Hello, world!"
- .text
- .globl main
- .type main, @function
- main:
- push ebp
- mov ebp, esp
- and esp, -16
- sub esp, 16
- mov DWORD PTR [esp], OFFSET FLAT:.LC0
- call puts
- mov eax, 0
- leave
- ret
- .size main, .-main
- .ident "GCC: (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1"
- .section .note.GNU-stack,"",@progbits
- # mingw
- $ i686-pc-mingw32-gcc -xc -S -o - -<<<'int main() { puts("Hello, world!"); }' -std=c99 -include stdio.h -masm=intel
- .file ""
- .intel_syntax noprefix
- .def ___main; .scl 2; .type 32; .endef
- .section .rdata,"dr"
- LC0:
- .ascii "Hello, world!\0"
- .text
- .globl _main
- .def _main; .scl 2; .type 32; .endef
- _main:
- push ebp
- mov ebp, esp
- and esp, -16
- sub esp, 16
- call ___main
- mov DWORD PTR [esp], OFFSET FLAT:LC0
- call _puts
- mov eax, 0
- leave
- ret
- .def _puts; .scl 2; .type 32; .endef
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement