diff --git a/libc-test/semver/android-aarch64.txt b/libc-test/semver/android-aarch64.txt index cc95c6a29f25b..2f7735d81f6f5 100644 --- a/libc-test/semver/android-aarch64.txt +++ b/libc-test/semver/android-aarch64.txt @@ -1,3 +1,6 @@ +AT_MINSIGSTKSZ +AT_SYSINFO_EHD +AT_VECTOR_SIZE_ARCH HWCAP2_DCPODP HWCAP2_FLAGM2 HWCAP2_FRINT diff --git a/libc-test/semver/android-arm.txt b/libc-test/semver/android-arm.txt index fe1ce5bba1c5d..615b433ca511a 100644 --- a/libc-test/semver/android-arm.txt +++ b/libc-test/semver/android-arm.txt @@ -1,3 +1,4 @@ +AT_SYSINFO_EHD NGREG PTRACE_GETFPREGS PTRACE_GETREGS diff --git a/libc-test/semver/android-i686.txt b/libc-test/semver/android-i686.txt index 78911584cbf2d..9145ed68fe446 100644 --- a/libc-test/semver/android-i686.txt +++ b/libc-test/semver/android-i686.txt @@ -1,3 +1,6 @@ +AT_SYSINFO +AT_SYSINFO_EHD +AT_VECTOR_SIZE_ARC SYS_memfd_secret __c_anonymous_uc_sigmask __c_anonymous_uc_sigmask_with_padding diff --git a/libc-test/semver/android-riscv64.txt b/libc-test/semver/android-riscv64.txt new file mode 100644 index 0000000000000..c07df5feb1d87 --- /dev/null +++ b/libc-test/semver/android-riscv64.txt @@ -0,0 +1,11 @@ +AT_L1D_CACHEGEOMETRY +AT_L1D_CACHESIZE +AT_L1I_CACHEGEOMETRY +AT_L1I_CACHESIZE +AT_L2_CACHEGEOMETRY +AT_L2_CACHESIZE +AT_L3_CACHEGEOMETRY +AT_L3_CACHESIZE +AT_MINSIGSTKSZ +AT_SYSINFO_EHDR +AT_VECTOR_SIZE_ARCH diff --git a/libc-test/semver/android-x86_64.txt b/libc-test/semver/android-x86_64.txt index 3aa3a6a77a638..94c238bbde3be 100644 --- a/libc-test/semver/android-x86_64.txt +++ b/libc-test/semver/android-x86_64.txt @@ -1,3 +1,6 @@ +AT_SYSINFO +AT_SYSINFO_EHD +AT_VECTOR_SIZE_ARC EFLAGS FS_BASE GS_BASE diff --git a/libc-test/semver/android.txt b/libc-test/semver/android.txt index 7df52bc9ce3e9..e5e4777d48f36 100644 --- a/libc-test/semver/android.txt +++ b/libc-test/semver/android.txt @@ -136,13 +136,39 @@ ATF_NETMASK ATF_PERM ATF_PUBL ATF_USETRAILERS +AT_BASE +AT_BASE_PLATFORM +AT_CLKTCK +AT_EGID AT_EMPTY_PATH +AT_ENTRY +AT_EUID +AT_EXECFD +AT_EXECFN AT_FDCWD +AT_FLAGS +AT_GID +AT_HWCAP +AT_HWCAP2 +AT_IGNORE +AT_MINSIGSTKSZ +AT_NOTELF AT_NO_AUTOMOUNT +AT_NULL +AT_PAGESZ +AT_PHDR +AT_PHENT +AT_PHNUM +AT_PLATFORM +AT_RANDOM AT_RECURSIVE AT_REMOVEDIR +AT_RSEQ_ALIGN +AT_RSEQ_FEATURE_SIZE +AT_SECURE AT_SYMLINK_FOLLOW AT_SYMLINK_NOFOLLOW +AT_UID B0 B1000000 B110 diff --git a/src/unix/linux_like/android/b32/arm.rs b/src/unix/linux_like/android/b32/arm.rs index 26bfed18aba99..3c004b1642eec 100644 --- a/src/unix/linux_like/android/b32/arm.rs +++ b/src/unix/linux_like/android/b32/arm.rs @@ -545,6 +545,9 @@ pub const REG_R15: ::c_int = 15; pub const NGREG: ::c_int = 18; +// From NDK's asm/auxvec.h +pub const AT_SYSINFO_EHD: ::c_ulong = 33; + f! { // Sadly, Android before 5.0 (API level 21), the accept4 syscall is not // exposed by the libc. As work-around, we implement it through `syscall` diff --git a/src/unix/linux_like/android/b32/x86/mod.rs b/src/unix/linux_like/android/b32/x86/mod.rs index feec5ce6606a4..4102bbd8584be 100644 --- a/src/unix/linux_like/android/b32/x86/mod.rs +++ b/src/unix/linux_like/android/b32/x86/mod.rs @@ -598,6 +598,11 @@ pub const REG_EFL: ::c_int = 16; pub const REG_UESP: ::c_int = 17; pub const REG_SS: ::c_int = 18; +// From NDK's asm/auxvec.h +pub const AT_SYSINFO: ::c_ulong = 32; +pub const AT_SYSINFO_EHD: ::c_ulong = 33; +pub const AT_VECTOR_SIZE_ARC: ::c_ulong = 3; + // socketcall values from linux/net.h (only the needed ones, and not public) const SYS_ACCEPT4: ::c_int = 18; diff --git a/src/unix/linux_like/android/b64/aarch64/mod.rs b/src/unix/linux_like/android/b64/aarch64/mod.rs index 46cde40ae4c73..14e4553b6f03c 100644 --- a/src/unix/linux_like/android/b64/aarch64/mod.rs +++ b/src/unix/linux_like/android/b64/aarch64/mod.rs @@ -433,6 +433,11 @@ pub const SYS_syscalls: ::c_long = 451; pub const PROT_BTI: ::c_int = 0x10; pub const PROT_MTE: ::c_int = 0x20; +// From NDK's asm/auxvec.h +pub const AT_SYSINFO_EHD: ::c_ulong = 33; +pub const AT_MINSIGSTKSZ: ::c_ulong = 51; +pub const AT_VECTOR_SIZE_ARCH: ::c_ulong = 2; + mod align; pub use self::align::*; diff --git a/src/unix/linux_like/android/b64/mod.rs b/src/unix/linux_like/android/b64/mod.rs index 9639e1b4fa589..97cf137b7fc79 100644 --- a/src/unix/linux_like/android/b64/mod.rs +++ b/src/unix/linux_like/android/b64/mod.rs @@ -264,32 +264,6 @@ pub const RTLD_GLOBAL: ::c_int = 0x00100; pub const RTLD_NOW: ::c_int = 2; pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void; -// From NDK's linux/auxvec.h -pub const AT_NULL: ::c_ulong = 0; -pub const AT_IGNORE: ::c_ulong = 1; -pub const AT_EXECFD: ::c_ulong = 2; -pub const AT_PHDR: ::c_ulong = 3; -pub const AT_PHENT: ::c_ulong = 4; -pub const AT_PHNUM: ::c_ulong = 5; -pub const AT_PAGESZ: ::c_ulong = 6; -pub const AT_BASE: ::c_ulong = 7; -pub const AT_FLAGS: ::c_ulong = 8; -pub const AT_ENTRY: ::c_ulong = 9; -pub const AT_NOTELF: ::c_ulong = 10; -pub const AT_UID: ::c_ulong = 11; -pub const AT_EUID: ::c_ulong = 12; -pub const AT_GID: ::c_ulong = 13; -pub const AT_EGID: ::c_ulong = 14; -pub const AT_PLATFORM: ::c_ulong = 15; -pub const AT_HWCAP: ::c_ulong = 16; -pub const AT_CLKTCK: ::c_ulong = 17; -pub const AT_SECURE: ::c_ulong = 23; -pub const AT_BASE_PLATFORM: ::c_ulong = 24; -pub const AT_RANDOM: ::c_ulong = 25; -pub const AT_HWCAP2: ::c_ulong = 26; -pub const AT_EXECFN: ::c_ulong = 31; -pub const AT_MINSIGSTKSZ: ::c_ulong = 51; - pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { value: 0, __reserved: [0; 36], diff --git a/src/unix/linux_like/android/b64/riscv64/mod.rs b/src/unix/linux_like/android/b64/riscv64/mod.rs index 405b9ac005439..c84c75a52612c 100644 --- a/src/unix/linux_like/android/b64/riscv64/mod.rs +++ b/src/unix/linux_like/android/b64/riscv64/mod.rs @@ -362,5 +362,18 @@ pub const SYS_process_mrelease: ::c_long = 448; pub const SYS_futex_waitv: ::c_long = 449; pub const SYS_set_mempolicy_home_node: ::c_long = 450; +// From NDK's asm/auxvec.h +pub const AT_SYSINFO_EHDR: ::c_ulong = 33; +pub const AT_L1I_CACHESIZE: ::c_ulong = 40; +pub const AT_L1I_CACHEGEOMETRY: ::c_ulong = 41; +pub const AT_L1D_CACHESIZE: ::c_ulong = 42; +pub const AT_L1D_CACHEGEOMETRY: ::c_ulong = 43; +pub const AT_L2_CACHESIZE: ::c_ulong = 44; +pub const AT_L2_CACHEGEOMETRY: ::c_ulong = 45; +pub const AT_L3_CACHESIZE: ::c_ulong = 46; +pub const AT_L3_CACHEGEOMETRY: ::c_ulong = 47; +pub const AT_VECTOR_SIZE_ARCH: ::c_ulong = 9; +pub const AT_MINSIGSTKSZ: ::c_ulong = 51; + mod align; pub use self::align::*; diff --git a/src/unix/linux_like/android/b64/x86_64/mod.rs b/src/unix/linux_like/android/b64/x86_64/mod.rs index 9062e2feea701..8fdb7e5032028 100644 --- a/src/unix/linux_like/android/b64/x86_64/mod.rs +++ b/src/unix/linux_like/android/b64/x86_64/mod.rs @@ -808,5 +808,10 @@ pub const REG_TRAPNO: ::c_int = 20; pub const REG_OLDMASK: ::c_int = 21; pub const REG_CR2: ::c_int = 22; +// From NDK's asm/auxvec.h +pub const AT_SYSINFO: ::c_ulong = 32; +pub const AT_SYSINFO_EHDR: ::c_ulong = 33; +pub const AT_VECTOR_SIZE_ARCH: ::c_ulong = 3; + mod align; pub use self::align::*; diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index d820665d2ba85..4480cf4c4231a 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -3475,6 +3475,34 @@ pub const PF_MEMALLOC_PIN: ::c_int = 0x10000000; pub const PF_SUSPEND_TASK: ::c_int = 0x80000000; +// From NDK's linux/auxvec.h +pub const AT_NULL: ::c_ulong = 0; +pub const AT_IGNORE: ::c_ulong = 1; +pub const AT_EXECFD: ::c_ulong = 2; +pub const AT_PHDR: ::c_ulong = 3; +pub const AT_PHENT: ::c_ulong = 4; +pub const AT_PHNUM: ::c_ulong = 5; +pub const AT_PAGESZ: ::c_ulong = 6; +pub const AT_BASE: ::c_ulong = 7; +pub const AT_FLAGS: ::c_ulong = 8; +pub const AT_ENTRY: ::c_ulong = 9; +pub const AT_NOTELF: ::c_ulong = 10; +pub const AT_UID: ::c_ulong = 11; +pub const AT_EUID: ::c_ulong = 12; +pub const AT_GID: ::c_ulong = 13; +pub const AT_EGID: ::c_ulong = 14; +pub const AT_PLATFORM: ::c_ulong = 15; +pub const AT_HWCAP: ::c_ulong = 16; +pub const AT_CLKTCK: ::c_ulong = 17; +pub const AT_SECURE: ::c_ulong = 23; +pub const AT_BASE_PLATFORM: ::c_ulong = 24; +pub const AT_RANDOM: ::c_ulong = 25; +pub const AT_HWCAP2: ::c_ulong = 26; +pub const AT_RSEQ_FEATURE_SIZE: ::c_ulong = 27; +pub const AT_RSEQ_ALIGN: ::c_ulong = 28; +pub const AT_EXECFN: ::c_ulong = 31; +pub const AT_MINSIGSTKSZ: ::c_ulong = 51; + // Most `*_SUPER_MAGIC` constants are defined at the `linux_like` level; the // following are only available on newer Linux versions than the versions // currently used in CI in some configurations, so we define them here.