-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing bindings of sys/syscall.h #662
Comments
PRs are of course always welcome! There's no reason these haven't been added other than no one's gotten around to doing it yet. |
So let's find a cute name for that... :) |
Oh we should just stick to the libc names, not invent new names. |
Ok, so which of two names: |
Fixed by #672 |
* Attempt to fix tests on master * Make all doctests use items from the real `std` rather than this crate, it's just easier * Handle debuginfo weirdness by flagging functions as `no_mangle` that we're looking for instructions within. * Handle double undescores in symbol names
At least on glibc 2.25 there's a header
sys/syscall.h
which defines all the syscall numbers by name. It effectively includesasm/unistd_64.h
(on x86_64) which is structured like this:and
bits/syscall.h
, which does something like this:I don't insist on 1-1 binding but I believe we should have a syscall registry in Rust. Currently, every Rust application that uses
seccomp
orptrace
has to hardcode the syscall numbers.Btw. do you think that such thing should be a part of the
libc
crate or rather an external crate such as https://github.com/nix-rust/nix ?The text was updated successfully, but these errors were encountered: