syscall.sh / arc / read
read
read from a file descriptor
sys_read(unsigned int fd, char *buf, size_t count)
| number | 63 (0x3f) |
|---|---|
| abi | common |
| entry point | sys_read |
| since | Linux 3.9 |
| man page | read(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
r8 | 63, the syscall number |
r0 | unsigned int fd |
r1 | char *buf |
r2 | size_t count |
r0 | the return value |
Then run trap0 to enter the kernel.
Same syscall on other architectures
- x64 0
- x86 3
- arm64 63
- arm 3
- riscv64 63
- x32 1073741824
- loongarch64 63
- ppc64 3
- ppc 3
- s390x 3
- mips64 5000
- mipsn32 6000
- mipso32 4003
- alpha 3
- csky 63
- hexagon 63
- m68k 3
- microblaze 3
- nios2 63
- openrisc 63
- parisc 3
- sh 3
- sparc 3
- sparc64 3
- xtensa 12
Get this as JSON: https://api.syscall.sh/v2/syscalls/arc/read