Skip to content

Commit

Permalink
Auto merge of #3027 - Phantomical:auxval, r=JohnTitor
Browse files Browse the repository at this point in the history
linux: Add AT_SYSINFO_EHDR constant

When passed to [`getauxval(3)`][2] this is used to retrieve the base address of the vdso mapped into the current process. It is defined the architecture specific `auxvec.h` headers but [it is defined to the same value in all of them][1] so I've put it in `src/unix/linux_like/linux/mod.rs` instead of in the arch submodule.

[1]: https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/torvalds/linux%24+%23define+AT_SYSINFO_EHDR&patternType=standard&sm=1
[2]: https://man7.org/linux/man-pages/man3/getauxval.3.html
  • Loading branch information
bors committed Dec 11, 2022
2 parents 2cc0b3b + ce9ab41 commit 22eaf09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ AT_SECURE
AT_SYMLINK_FOLLOW
AT_SYMLINK_NOFOLLOW
AT_UID
AT_SYSINFO_EHDR
B1000000
B1152000
B1500000
Expand Down
4 changes: 4 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1583,6 +1583,10 @@ pub const AT_HWCAP2: ::c_ulong = 26;

pub const AT_EXECFN: ::c_ulong = 31;

// defined in arch/<arch>/include/uapi/asm/auxvec.h but has the same value
// wherever it is defined.
pub const AT_SYSINFO_EHDR: ::c_ulong = 33;

pub const GLOB_ERR: ::c_int = 1 << 0;
pub const GLOB_MARK: ::c_int = 1 << 1;
pub const GLOB_NOSORT: ::c_int = 1 << 2;
Expand Down

0 comments on commit 22eaf09

Please sign in to comment.