summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc-test/semver/android.txt15
-rw-r--r--src/unix/linux_like/android/mod.rs19
2 files changed, 34 insertions, 0 deletions
diff --git a/libc-test/semver/android.txt b/libc-test/semver/android.txt
index b9845e9414..77827a87e2 100644
--- a/libc-test/semver/android.txt
+++ b/libc-test/semver/android.txt
@@ -1677,6 +1677,21 @@ PTRACE_SETSIGINFO
PTRACE_SINGLESTEP
PTRACE_SYSCALL
PTRACE_TRACEME
+PT_HIOS
+PT_LOPROC
+PT_HIPROC
+PT_DYNAMIC
+PT_GNU_EH_FRAME
+PT_GNU_RELRO
+PT_GNU_STACK
+PT_INTERP
+PT_LOAD
+PT_LOOS
+PT_NOTE
+PT_NULL
+PT_PHDR
+PT_SHLIB
+PT_TLS
P_ALL
P_PGID
P_PID
diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs
index 5e6fae7dae..bc738f9068 100644
--- a/src/unix/linux_like/android/mod.rs
+++ b/src/unix/linux_like/android/mod.rs
@@ -1867,6 +1867,25 @@ pub const MFD_CLOEXEC: ::c_uint = 0x0001;
pub const MFD_ALLOW_SEALING: ::c_uint = 0x0002;
pub const MFD_HUGETLB: ::c_uint = 0x0004;
+// these are used in the p_type field of Elf32_Phdr and Elf64_Phdr, which has
+// the type Elf32Word and Elf64Word respectively. Luckily, both of those are u32
+// so we can use that type here to avoid having to cast.
+pub const PT_NULL: u32 = 0;
+pub const PT_LOAD: u32 = 1;
+pub const PT_DYNAMIC: u32 = 2;
+pub const PT_INTERP: u32 = 3;
+pub const PT_NOTE: u32 = 4;
+pub const PT_SHLIB: u32 = 5;
+pub const PT_PHDR: u32 = 6;
+pub const PT_TLS: u32 = 7;
+pub const PT_LOOS: u32 = 0x60000000;
+pub const PT_GNU_EH_FRAME: u32 = 0x6474e550;
+pub const PT_GNU_STACK: u32 = 0x6474e551;
+pub const PT_GNU_RELRO: u32 = 0x6474e552;
+pub const PT_HIOS: u32 = 0x6fffffff;
+pub const PT_LOPROC: u32 = 0x70000000;
+pub const PT_HIPROC: u32 = 0x7fffffff;
+
// linux/netfilter.h
pub const NF_DROP: ::c_int = 0;
pub const NF_ACCEPT: ::c_int = 1;