Advertisement
Guest User

Untitled

a guest
Feb 20th, 2022
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. $ objdump -S program
  2.  
  3. program: file format elf64-x86-64
  4.  
  5.  
  6. Disassembly of section .text:
  7.  
  8. 00000000004000b0 <_start>:
  9. SECTION .text
  10. global _start
  11.  
  12. _start:
  13. ; Print "Hello world!".
  14. mov RAX, 1 ; RAX is the kernel op code (1 is sys_write).
  15. 4000b0: b8 01 00 00 00 mov $0x1,%eax
  16. mov RDI, 1 ; RDI is the file descriptor (0 is stdout, 1 is stdin, 2 is stderr).
  17. 4000b5: bf 01 00 00 00 mov $0x1,%edi
  18. mov RSI, message; RSI is the address of the buffer.
  19. 4000ba: 48 be d8 00 60 00 00 movabs $0x6000d8,%rsi
  20. 4000c1: 00 00 00
  21. mov RDX, 13 ; RDX is is length of the buffer.
  22. 4000c4: ba 0d 00 00 00 mov $0xd,%edx
  23. syscall
  24. 4000c9: 0f 05 syscall
  25.  
  26. ; Exit the origram
  27. mov RAX, 60 ; RAX is the kernel op code (60 is sys_exit).
  28. 4000cb: b8 3c 00 00 00 mov $0x3c,%eax
  29. mov RDI, 0 ; RDI is return code (0 for success).
  30. 4000d0: bf 00 00 00 00 mov $0x0,%edi
  31. syscall
  32. 4000d5: 0f 05 syscall
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement