Here's my code:
@execve takes 3 arguments (r0,r1,r2)
mov r7,#11 @syscall number for execve
ldr r0,=addr_of_string
sub r1,r1,r1 @so that r1 can get zero
sub r2,r2,r2 @same for r2
svc #0
end:
mov r7,#1
svc 0
.data
addr_of_string: .asciz "\bin\ls"
It compiles successfully and links successfully but when I execute it, I get :
A NULL argv[0] was passed through an exec system call