I am trying to get into a bit of Linux 64bit x86 assembly without using the standard libs, however I am having some issues dealing with arguments presented to my program (ar
At rsp+8
you'll find the address of a string with the program path. The pointer to the first argument is at [rsp+16]
. But for execve
you need a pointer to an array of pointer to strings which begins with a pointer to a program path (you can (ab)use [rsp+8]
).
So change
mov rsi, [rsp + 8]
to
lea rsi, [rsp + 8]