如何在RISC-V Linux中添加系统调用?
关于如何向针对 x86 的 Linux 添加系统调用有详细的文档,例如有一个文件 /arch/x86/entry/syscalls/syscall_64.tbl
。
我在/arch/riscv
下搜索了目录entry
但没有找到。我尝试查找/arch/riscv
下是否有以.tbl
结尾的文件,但仍然没有找到任何东西。
是否有任何有用的资源来描述 RISC-V Linux 如何处理系统调用以及我们如何向其中添加我们自己的系统调用?或者我们可以忽略 syscall_64.tbl 文件?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
感谢@oakad 的评论。我没有尝试这种方法,但发现了一种有用的 文章讨论此问题:
添加到 riscv 与 x86 类似,只是 riscv 没有系统调用表。因此,无需添加到 riscv 表中。对于其余步骤,请按照此 链接。
Thanks @oakad's comment. I did not try that approach, but found one useful article that discusses about this:
Adding to riscv is similar to x86, except that riscv does not have a syscall table. Hence, no need to add to the table for riscv. For the rest of the steps, follow this link.