summaryrefslogtreecommitdiff
path: root/include/mach/exec/elf.h
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2024-03-28 09:40:50 +0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-03-29 00:32:46 +0100
commitdf19628b2b6665468e698e290dfd1568720ba042 (patch)
treef021003706eb8cd45f95e7be96953a230e246334 /include/mach/exec/elf.h
parentced537ad297754e08b19536102712c692c949f44 (diff)
elf-load: Respect PT_GNU_STACK
If a bootstrap ELF contains a PT_GNU_STACK phdr, take stack protection from there. Otherwise, default to VM_PROT_ALL.
Diffstat (limited to 'include/mach/exec/elf.h')
-rw-r--r--include/mach/exec/elf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mach/exec/elf.h b/include/mach/exec/elf.h
index 9e4f8f7e..55304496 100644
--- a/include/mach/exec/elf.h
+++ b/include/mach/exec/elf.h
@@ -300,6 +300,7 @@ typedef struct {
#define PT_NOTE 4
#define PT_SHLIB 5
#define PT_PHDR 6
+#define PT_GNU_STACK 0x6474e551
#define PT_LOPROC 0x70000000
#define PT_HIPROC 0x7fffffff