Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. 513 rjek@octopus:~$ cat test.c
  2. int foo(void) { return 1; }
  3.  
  4. 514 rjek@octopus:~$ faucc -b i286 -c test.c -o test.o
  5. 515 rjek@octopus:~$ objdump -d test.o
  6.  
  7. test.o: file format elf32-i386
  8.  
  9.  
  10. Disassembly of section .text:
  11.  
  12. 00000000 <foo>:
  13. 0: 55 push %ebp
  14. 1: 89 e5 mov %esp,%ebp
  15. 3: b8 01 00 5d cb mov $0xcb5d0001,%eax
  16. 516 rjek@octopus:~$ gcc -O2 -m32 -c test.c
  17. 517 rjek@octopus:~$ objdump -d test.o
  18.  
  19. test.o: file format elf32-i386
  20.  
  21.  
  22. Disassembly of section .text:
  23.  
  24. 00000000 <foo>:
  25. 0: 55 push %ebp
  26. 1: b8 01 00 00 00 mov $0x1,%eax
  27. 6: 89 e5 mov %esp,%ebp
  28. 8: 5d pop %ebp
  29. 9: c3 ret
  30. 518 rjek@octopus:~$ gcc -O2 -m64 -c test.c
  31. 519 rjek@octopus:~$ objdump -d test.o
  32.  
  33. test.o: file format elf64-x86-64
  34.  
  35.  
  36. Disassembly of section .text:
  37.  
  38. 0000000000000000 <foo>:
  39. 0: b8 01 00 00 00 mov $0x1,%eax
  40. 5: c3 retq
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement