syscall.sh / arm / dup3

dup3

duplicate a file descriptor

sys_dup3(unsigned int oldfd, unsigned int newfd, int flags)
number358 (0x166)
abicommon
entry pointsys_dup3
sinceLinux 4.10
man pagedup3(2)
sourceelixir.bootlin.com

Registers

registervalue
r7358, the syscall number
r0unsigned int oldfd
r1unsigned int newfd
r2int flags
r0the return value

Then run svc #0 to enter the kernel.

Same syscall on other architectures

Get this as JSON: https://api.syscall.sh/v2/syscalls/arm/dup3