syscall.sh / xtensa / dup3

dup3

duplicate a file descriptor

sys_dup3(unsigned int oldfd, unsigned int newfd, int flags)
number310 (0x136)
abicommon
entry pointsys_dup3
sinceLinux 5.0
man pagedup3(2)
sourceelixir.bootlin.com

Registers

registervalue
a2310, the syscall number
a6unsigned int oldfd
a3unsigned int newfd
a4int flags
a2the return value

Then run syscall to enter the kernel.

Same syscall on other architectures

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