.global main
main:
bx lr
If I do:
kali@kali:~/Desktop/arm/NEEVVVV$ ./a.out a b c
Segmentation fault
kali@kali:~/Desktop/arm/NEEVVVV$ echo $?
139
139 is null pointer exception.. why does this happens?
Shouldn't I be able to see the number of argv since in r0 does contain argc ?
argc is just an integer, why this does not work? int main (int argc, char *argv[])
says that argc is an int, not an address, so if I see the exit code (r0) there should be the argc, but nope
EDIT:
FIXED by adding this:
.type main%function
after .global main