summaryrefslogtreecommitdiff
path: root/libc/misc/elf
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc/elf')
-rw-r--r--libc/misc/elf/dl-support.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/misc/elf/dl-support.c b/libc/misc/elf/dl-support.c
index f1946924c..ae77f5261 100644
--- a/libc/misc/elf/dl-support.c
+++ b/libc/misc/elf/dl-support.c
@@ -28,6 +28,7 @@ void (*_dl_init_static_tls) (struct link_map *) = &_dl_nothread_init_static_tls;
ElfW(Phdr) *_dl_phdr;
size_t _dl_phnum;
+size_t _dl_pagesize;
void internal_function _dl_aux_init (ElfW(auxv_t) *av);
void internal_function _dl_aux_init (ElfW(auxv_t) *av)
@@ -37,6 +38,9 @@ void internal_function _dl_aux_init (ElfW(auxv_t) *av)
/* Get the number of program headers from the aux vect */
_dl_phnum = (size_t) av[AT_PHNUM].a_un.a_val;
+
+ /* Get the pagesize from the aux vect */
+ _dl_pagesize = (av[AT_PAGESZ].a_un.a_val) ? (size_t) av[AT_PAGESZ].a_un.a_val : PAGE_SIZE;
}
#if defined(USE_TLS) && USE_TLS