Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ objdump -S program
- program: file format elf64-x86-64
- Disassembly of section .text:
- 00000000004000b0 <_start>:
- SECTION .text
- global _start
- _start:
- ; Print "Hello world!".
- mov RAX, 1 ; RAX is the kernel op code (1 is sys_write).
- 4000b0: b8 01 00 00 00 mov $0x1,%eax
- mov RDI, 1 ; RDI is the file descriptor (0 is stdout, 1 is stdin, 2 is stderr).
- 4000b5: bf 01 00 00 00 mov $0x1,%edi
- mov RSI, message; RSI is the address of the buffer.
- 4000ba: 48 be d8 00 60 00 00 movabs $0x6000d8,%rsi
- 4000c1: 00 00 00
- mov RDX, 13 ; RDX is is length of the buffer.
- 4000c4: ba 0d 00 00 00 mov $0xd,%edx
- syscall
- 4000c9: 0f 05 syscall
- ; Exit the origram
- mov RAX, 60 ; RAX is the kernel op code (60 is sys_exit).
- 4000cb: b8 3c 00 00 00 mov $0x3c,%eax
- mov RDI, 0 ; RDI is return code (0 for success).
- 4000d0: bf 00 00 00 00 mov $0x0,%edi
- syscall
- 4000d5: 0f 05 syscall
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement