syscall.sh / xtensa / dup2

dup2

duplicate a file descriptor

sys_dup2(unsigned int oldfd, unsigned int newfd)
number11 (0xb)
abicommon
entry pointsys_dup2
sinceLinux 5.0
man pagedup2(2)
sourceelixir.bootlin.com

Registers

registervalue
a211, the syscall number
a6unsigned int oldfd
a3unsigned int newfd
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/dup2