如何获取syscall号码(而不编译)?
我正在尝试从java调用syscalls,例如这个答案。 (具体来说,安装
。)答案说要调用syscall
。
有没有办法以编程方式获取SYSCALL数字?
假设否,我必须在include文件中进行硬编码或挖掘它,您可以回答:
- 在linux上,
/usr/include/asm/unistd.h
(/usr/include/x86_64-linux-gnu/asm/unistd 在ubuntu x86_64上)和
/usr/include/asm-generic/asm-generic/unistd.h
?什么是asm-generic
,为什么它具有不同的值? - 为什么Linux-ARM64仅具有
asm-generic
? - 有没有更好的方法来调用
Mount
?它在什么库中? - MACOS和BSD呢?
I am trying to invoke syscalls from Java like in this answer. (Specifically, mount
.) The answer says to invoke syscall
.
Is there a way to get the syscall number programmatically?
Assuming no and I have to hard-code it or dig for it in include files, could you answer:
- On Linux, What is the difference between
/usr/include/asm/unistd.h
(/usr/include/x86_64-linux-gnu/asm/unistd
on Ubuntu x86_64) and/usr/include/asm-generic/unistd.h
? What isasm-generic
and why does it have different values? - Why does linux-arm64 only have
asm-generic
? - Is there a better way to call
mount
? What library is it in? - What about MacOS and BSD?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论