aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc
diff options
context:
space:
mode:
authorCupertino Miranda <cupertino.miranda@oracle.com>2025-08-22 11:37:00 +0100
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2025-08-27 10:45:45 -0300
commit3b2b88cceeb79f73a72367800d91599e2af4bb39 (patch)
treea4f7c0efe8d6c2a49ac448c977a639e609c3f45c /sysdeps/sparc
parent921e251e8f364d00fc753274095007275381ae65 (diff)
downloadglibc-3b2b88cceeb79f73a72367800d91599e2af4bb39.zip
glibc-3b2b88cceeb79f73a72367800d91599e2af4bb39.tar.gz
glibc-3b2b88cceeb79f73a72367800d91599e2af4bb39.tar.bz2
elf: early conversion of elf p_flags to mprotect flags
This patch replaces _dl_stack_flags global variable by _dl_stack_prot_flags. The advantage is that any convertion from p_flags to final used mprotect flags occurs at loading of p_flags. It avoids repeated spurious convertions of _dl_stack_flags, for example in allocate_thread_stack. This modification was suggested in: https://sourceware.org/pipermail/libc-alpha/2025-March/165537.html Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/sparc')
-rw-r--r--sysdeps/sparc/stackinfo.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/sparc/stackinfo.h b/sysdeps/sparc/stackinfo.h
index 23a74ed..a4a0eb1 100644
--- a/sysdeps/sparc/stackinfo.h
+++ b/sysdeps/sparc/stackinfo.h
@@ -26,8 +26,8 @@
/* On sparc the stack grows down. */
#define _STACK_GROWS_DOWN 1
-/* Default to an executable stack. PF_X can be overridden if PT_GNU_STACK is
- * present, but it is presumed absent. */
-#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)
+/* Default to an executable stack. PROT_EXEC can be overridden if PT_GNU_STACK
+ * is present, but it is presumed absent. */
+#define DEFAULT_STACK_PROT_PERMS (PROT_READ|PROT_WRITE|PROT_EXEC)
#endif /* stackinfo.h */