I have the following piece of code(Which is not necessarily correct )
Code:
/* gcc main.s -o main */
.global main
main:
movq %rax, 1
movq %rdi, 1
movq %rsi, 3
movq %rdx, 13
syscall
movq %rax, 13
movq %rdi, 0
syscall
I have the following dissassembly.
Code:
/* objdump -d main */
00000000004004b6 <main>:
4004b6: 48 89 04 25 01 00 00 mov %rax,0x1
4004bd: 00
4004be: 48 89 3c 25 01 00 00 mov %rdi,0x1
4004c5: 00
4004c6: 48 89 34 25 03 00 00 mov %rsi,0x3
4004cd: 00
4004ce: 48 89 14 25 0d 00 00 mov %rdx,0xd
4004d5: 00
4004d6: 0f 05 syscall
4004d8: 48 89 04 25 0d 00 00 mov %rax,0xd
4004df: 00
4004e0: 48 89 3c 25 00 00 00 mov %rdi,0x0
4004e7: 00
4004e8: 0f 05 syscall
4004ea: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
Just the main function - anyway - the rest are the C library setup routine so no need going over them
any ideas why am I am getting the null bytes its probably something silly am missing out ?