Hi
I am trying to write assembly code on armv61 Arch and i need to call execve .
For x86 & x86-64 system call number is 59 (64bit) and 11 (32bit) and can be found using below method
$this->bbcode_second_pass_code('', '$ grep execve /usr/include/x86_64-linux-gnu/asm/unistd_64.h
#define __NR_execve 59
#define __NR_execveat 322
$ grep execve /usr/include/x86_64-linux-gnu/asm/unistd_32.h
#define __NR_execve 11
#define __NR_execveat 358
')
similarly is there any method to do the same in arm? How to be sure which one will yield the correct system call number?
Below if the results from Arm system
$this->bbcode_second_pass_code('', '$ find /usr/include -name "unistd.h"
/usr/include/bits/unistd.h
/usr/include/sys/unistd.h
/usr/include/linux/unistd.h
/usr/include/asm/unistd.h
/usr/include/unistd.h
/usr/include/asm-generic/unistd.h')
$this->bbcode_second_pass_code('', '$ grep execve /usr/include/asm/unistd-common.h
#define __NR_execve (__NR_SYSCALL_BASE + 11)
#define __NR_execveat (__NR_SYSCALL_BASE + 387)
$ grep execve /usr/include/asm-generic/unistd.h
#define __NR_execve 221
__SC_COMP(__NR_execve, sys_execve, compat_sys_execve)
#define __NR_execveat 281
__SC_COMP(__NR_execveat, sys_execveat, compat_sys_execveat)')
Kindly help me to find the right system call number for execve.
Thank You.
$this->bbcode_second_pass_quote('', 'L')inux alarmpi 4.4.34+ #3 Thu Dec 1 14:44:23 IST 2016 armv6l GNU/Linux