Skip to content

Add syscall table for x86 and x86_64 #672

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

Merged
merged 3 commits into from
Jul 18, 2017
Merged

Add syscall table for x86 and x86_64 #672

merged 3 commits into from
Jul 18, 2017

Conversation

marmistrz
Copy link
Contributor

I'm wondering if we should use SYS_write or __NR_write. Both are available to C programs.

@alexcrichton
Copy link
Member

Thanks! Looks like CI may be failing?

I don't mind which is added, we can always add both eventually!

@marmistrz marmistrz closed this Jul 17, 2017
@marmistrz marmistrz reopened this Jul 17, 2017
@marmistrz
Copy link
Contributor Author

I think we should stick with one set, two sets will unnecessarily enlarge the binary. Let's stick with SYS_*, since it's what I've seen in most tutorials.

Well, it didn't like a pub const after extern fn. Fixed that (I think :))

@alexcrichton
Copy link
Member

Looks like CI is still failing?

There were previous definitions of SYS_gettid and SYS_perf_event_open
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Jul 18, 2017

📌 Commit c0aaf42 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Jul 18, 2017

⌛ Testing commit c0aaf42 with merge 18b15ad...

bors added a commit that referenced this pull request Jul 18, 2017
Add syscall table for x86 and x86_64

I'm wondering if we should use `SYS_write` or `__NR_write`. Both are available to C programs.
@bors
Copy link
Contributor

bors commented Jul 18, 2017

💔 Test failed - status-travis

@alexcrichton
Copy link
Member

alexcrichton commented Jul 18, 2017 via email

@bors
Copy link
Contributor

bors commented Jul 18, 2017

⌛ Testing commit c0aaf42 with merge ec1e5ab...

bors added a commit that referenced this pull request Jul 18, 2017
Add syscall table for x86 and x86_64

I'm wondering if we should use `SYS_write` or `__NR_write`. Both are available to C programs.
@bors
Copy link
Contributor

bors commented Jul 18, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing ec1e5ab to master...

@bors bors merged commit c0aaf42 into rust-lang:master Jul 18, 2017
@ndusart
Copy link
Contributor

ndusart commented Jul 19, 2017

@marmistrz @alexcrichton In linux, syscall expect a c_long
We should rewrite all these constants to be of type c_long.

nix crate cannot be built for these targets anymore

@alexcrichton
Copy link
Member

Oops sorry I missed that breakage! I'll send a PR.

bors added a commit that referenced this pull request Jul 19, 2017
Restore SYS_* constants to the c_long type

cc #672 (comment)
@marmistrz
Copy link
Contributor Author

I wasn't fast enough to fix it myself :)

@ndusart
Copy link
Contributor

ndusart commented Jul 19, 2017

Thanks for the quick fix !

bors added a commit that referenced this pull request Jul 19, 2017
Restore SYS_* constants to the c_long type

cc #672 (comment)
marmistrz added a commit to marmistrz/libc that referenced this pull request Jul 25, 2017
marmistrz added a commit to marmistrz/libc that referenced this pull request Aug 1, 2017
I'd rather avoid the duplication, this is discussed in rust-lang#707.
marmistrz added a commit to marmistrz/libc that referenced this pull request Aug 1, 2017
I'd rather avoid the duplication, this is discussed in rust-lang#707.
bors added a commit that referenced this pull request Aug 2, 2017
bors added a commit that referenced this pull request Aug 4, 2017
Port #672 and #686 to Android.

I'd rather avoid the duplication, but this is discussed in #707.
danielverkamp pushed a commit to danielverkamp/libc that referenced this pull request Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants