diff options
Diffstat (limited to 'ldso/ldso/ldso.c')
-rw-r--r-- | ldso/ldso/ldso.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c index eed37c964..bd1e3cb30 100644 --- a/ldso/ldso/ldso.c +++ b/ldso/ldso/ldso.c @@ -46,6 +46,7 @@ unsigned char *_dl_mmap_zero = 0; /* Also used by _dl_malloc */ unsigned long *_dl_brkp = 0; /* The end of the data segment for brk and sbrk */ unsigned long *_dl_envp = 0; /* The environment address */ int _dl_secure = 1; /* Are we dealing with setuid stuff? */ +size_t _dl_pagesize = 0; /* Store the page size for use later */ @@ -102,7 +103,6 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, struct elf_resolve *app_tpnt int (*_dl_on_exit) (void (*FUNCTION)(int STATUS, void *ARG),void*); #endif - #ifdef __SUPPORT_LD_DEBUG_EARLY__ /* Wahoo!!! */ SEND_STDERR("Cool, we managed to make a function call.\n"); @@ -114,6 +114,9 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, struct elf_resolve *app_tpnt _dl_malloc_addr = malloc_buffer; _dl_mmap_zero = mmap_zero; + /* Store the page size for later use */ + _dl_pagesize = (auxvt[AT_PAGESZ].a_un.a_val)? auxvt[AT_PAGESZ].a_un.a_val : 4096; + /* Now we have done the mandatory linking of some things. We are now * free to start using global variables, since these things have all been * fixed up by now. Still no function calls outside of this library , |