aboutsummaryrefslogtreecommitdiff
path: root/include/mach/exec/exec.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/exec.h
parentced537ad297754e08b19536102712c692c949f44 (diff)
downloadgnumach-df19628b2b6665468e698e290dfd1568720ba042.tar.gz
gnumach-df19628b2b6665468e698e290dfd1568720ba042.tar.bz2
gnumach-df19628b2b6665468e698e290dfd1568720ba042.zip
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/exec.h')
-rw-r--r--include/mach/exec/exec.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mach/exec/exec.h b/include/mach/exec/exec.h
index 94b234b0..29fa897d 100644
--- a/include/mach/exec/exec.h
+++ b/include/mach/exec/exec.h
@@ -51,6 +51,8 @@ typedef struct exec_info
/* (ELF) Address of interpreter string for loading shared libraries, null if none. */
vm_offset_t interp;
+ /* Required stack protection. */
+ vm_prot_t stack_prot;
} exec_info_t;
typedef int exec_sectype_t;