about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2013-03-15 14:35:17 -0700
committerRoland McGrath <roland@hack.frob.com>2013-03-15 14:35:17 -0700
commitaefc9b8c7c62ec25568ae9241db333436ae6860b (patch)
treec11e4b301a60b88059a2ed4a5a6fb9f51578e812 /elf
parentbc16e260d0e74b36e48d30edc6ea4f1152700c09 (diff)
downloadglibc-aefc9b8c7c62ec25568ae9241db333436ae6860b.tar.gz
glibc-aefc9b8c7c62ec25568ae9241db333436ae6860b.tar.xz
glibc-aefc9b8c7c62ec25568ae9241db333436ae6860b.zip
Clean up _dl_pagesize initialization.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-support.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/elf/dl-support.c b/elf/dl-support.c
index b2bf31264e..ad9b4c40b0 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -198,7 +198,8 @@ _dl_aux_init (ElfW(auxv_t) *av)
     switch (av->a_type)
       {
       case AT_PAGESZ:
-	GLRO(dl_pagesize) = av->a_un.a_val;
+	if (av->a_un.a_val != 0)
+	  GLRO(dl_pagesize) = av->a_un.a_val;
 	break;
       case AT_CLKTCK:
 	GLRO(dl_clktck) = av->a_un.a_val;
@@ -266,9 +267,6 @@ _dl_non_dynamic_init (void)
   if (HP_TIMING_AVAIL)
     HP_TIMING_NOW (_dl_cpuclock_offset);
 
-  if (!_dl_pagesize)
-    _dl_pagesize = __getpagesize ();
-
   _dl_verbose = *(getenv ("LD_WARN") ?: "") == '\0' ? 0 : 1;
 
   /* Set up the data structures for the system-supplied DSO early,