summaryrefslogtreecommitdiff
path: root/ldso/ldso/ldso.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-05-11 11:14:58 +0000
committerEric Andersen <andersen@codepoet.org>2004-05-11 11:14:58 +0000
commit68c4b497dd7306e0146ebd8b3bbc8289ed4c6e33 (patch)
treeb76126f13f820979dac7a8084bd5a82f39c82995 /ldso/ldso/ldso.c
parentfd4f96fda50d2462621de89762659e7cc7d648a9 (diff)
make certain that getpagesize() returns correct the value for mips
by extracting the value from the ELF header.
Diffstat (limited to 'ldso/ldso/ldso.c')
-rw-r--r--ldso/ldso/ldso.c5
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 ,