syscall.sh / openrisc / dup3

dup3

duplicate a file descriptor

sys_dup3(unsigned int oldfd, unsigned int newfd, int flags)
number24 (0x18)
abicommon
entry pointsys_dup3
sinceLinux 3.7
man pagedup3(2)
sourceelixir.bootlin.com

Registers

registervalue
r1124, the syscall number
r3unsigned int oldfd
r4unsigned int newfd
r5int flags
r11the return value

Then run l.sys 1 to enter the kernel.

Same syscall on other architectures

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