Skip to content

Commit 6a5c07f

Browse files
committed
Auto merge of #3027 - Phantomical:auxval, r=JohnTitor
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
2 parents 8ccb828 + ce9ab41 commit 6a5c07f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

libc-test/semver/linux.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ AT_SECURE
181181
AT_SYMLINK_FOLLOW
182182
AT_SYMLINK_NOFOLLOW
183183
AT_UID
184+
AT_SYSINFO_EHDR
184185
B1000000
185186
B1152000
186187
B1500000

src/unix/linux_like/linux/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,6 +1583,10 @@ pub const AT_HWCAP2: ::c_ulong = 26;
15831583

15841584
pub const AT_EXECFN: ::c_ulong = 31;
15851585

1586+
// defined in arch/<arch>/include/uapi/asm/auxvec.h but has the same value
1587+
// wherever it is defined.
1588+
pub const AT_SYSINFO_EHDR: ::c_ulong = 33;
1589+
15861590
pub const GLOB_ERR: ::c_int = 1 << 0;
15871591
pub const GLOB_MARK: ::c_int = 1 << 1;
15881592
pub const GLOB_NOSORT: ::c_int = 1 << 2;

0 commit comments

Comments
 (0)