syscall.sh / x64 / getcwd

getcwd

get current working directory

sys_getcwd(char *buf, unsigned long size)
number79 (0x4f)
abicommon
entry pointsys_getcwd
sinceLinux 3.3
man pagegetcwd(2)
sourceelixir.bootlin.com

Registers

registervalue
rax79, the syscall number
rdichar *buf
rsiunsigned long size
raxthe return value

Then run syscall to enter the kernel.

Same syscall on other architectures

Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/getcwd