aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2024-01-03 20:14:44 +0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-01-04 23:48:36 +0100
commitfbfe0b20ab82550de65827e70aa89d8ae462b34d (patch)
treec001ef2962c52040ab970f518723377785aebeb4 /sysdeps/mach/hurd
parent4145de65f696ae06be72fadd67967be556c31ac2 (diff)
downloadglibc-fbfe0b20ab82550de65827e70aa89d8ae462b34d.tar
glibc-fbfe0b20ab82550de65827e70aa89d8ae462b34d.tar.gz
glibc-fbfe0b20ab82550de65827e70aa89d8ae462b34d.tar.bz2
glibc-fbfe0b20ab82550de65827e70aa89d8ae462b34d.zip
hurd: Initializy _dl_pagesize early in static builds
We fetch __vm_page_size as the very first RPC that we do, inside __mach_init (). Propagate that to _dl_pagesize ASAP after that, before any other initialization. In dynamic builds, this is already done immediately after __mach_init (), inside _dl_sysdep_start (). Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-ID: <20240103171502.1358371-12-bugaevc@gmail.com>
Diffstat (limited to 'sysdeps/mach/hurd')
-rw-r--r--sysdeps/mach/hurd/init-first.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/init-first.c b/sysdeps/mach/hurd/init-first.c
index 26ccd37e55..22c357474a 100644
--- a/sysdeps/mach/hurd/init-first.c
+++ b/sysdeps/mach/hurd/init-first.c
@@ -162,6 +162,10 @@ first_init (void)
/* Initialize data structures so we can do RPCs. */
__mach_init ();
+#ifndef SHARED
+ GLRO(dl_pagesize) = __vm_page_size;
+#endif
+
#if USE_INIT1_TCBHEAD
_hurd_tls_init (&__init1_tcbhead, 0);
#endif