aboutsummaryrefslogtreecommitdiff
path: root/patches/glibc/unsubmitted-getaux_at_secure.diff
diff options
context:
space:
mode:
authorPasha <pasha@member.fsf.org>2024-02-29 19:30:30 +0000
committerPasha <pasha@member.fsf.org>2024-02-29 19:30:30 +0000
commit84d199451cf33734003c00c043a1480920f5563b (patch)
tree4655f03b3637184bfb363b4e86d376756e85c9e3 /patches/glibc/unsubmitted-getaux_at_secure.diff
downloadcross-hurd-84d199451cf33734003c00c043a1480920f5563b.tar.gz
cross-hurd-84d199451cf33734003c00c043a1480920f5563b.tar.bz2
initial commit
Diffstat (limited to 'patches/glibc/unsubmitted-getaux_at_secure.diff')
-rw-r--r--patches/glibc/unsubmitted-getaux_at_secure.diff30
1 files changed, 30 insertions, 0 deletions
diff --git a/patches/glibc/unsubmitted-getaux_at_secure.diff b/patches/glibc/unsubmitted-getaux_at_secure.diff
new file mode 100644
index 0000000..0ecd5f7
--- /dev/null
+++ b/patches/glibc/unsubmitted-getaux_at_secure.diff
@@ -0,0 +1,30 @@
+FIXME: sysdeps/mach/hurd/i386/init-first.c should instead pass an auxv
+to __libc_start_main
+
+Index: glibc-2.33/misc/getauxval.c
+===================================================================
+--- glibc-2.33.orig/misc/getauxval.c
++++ glibc-2.33/misc/getauxval.c
+@@ -19,6 +19,7 @@
+ #include <errno.h>
+ #include <ldsodefs.h>
+ #include <stdbool.h>
++#include <unistd.h>
+
+ bool
+ __getauxval2 (unsigned long int type, unsigned long int *result)
+@@ -27,6 +28,14 @@ __getauxval2 (unsigned long int type, un
+ ElfW(auxv_t) *p;
+ #endif
+
++#ifdef AT_SECURE
++ if (type == AT_SECURE)
++ {
++ *result = __libc_enable_secure;
++ return true;
++ }
++#endif
++
+ if (type == AT_HWCAP)
+ {
+ *result = GLRO(dl_hwcap);