Browse Source

As noticed by the sharp eyed Joakim Tjernlund, I stupidly
hard coded 4096 instead of PAGE_SIZE. Because I'm an idiot.

Eric Andersen 21 years ago
parent
commit
21da42ed94
2 changed files with 2 additions and 2 deletions
  1. 1 1
      ldso/ldso/dl-startup.c
  2. 1 1
      ldso/ldso/ldso.c

+ 1 - 1
ldso/ldso/dl-startup.c

@@ -290,7 +290,7 @@ found_got:
 
 	/* Call mmap to get a page of writable memory that can be used
 	 * for _dl_malloc throughout the shared lib loader. */
-	_dl_pagesize = (auxvt[AT_PAGESZ].a_un.a_val)? auxvt[AT_PAGESZ].a_un.a_val : 4096;
+	_dl_pagesize = (auxvt[AT_PAGESZ].a_un.a_val)? auxvt[AT_PAGESZ].a_un.a_val : PAGE_SIZE;
 	mmap_zero = malloc_buffer = _dl_mmap((void *) 0, _dl_pagesize,
 			PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
 	if (_dl_mmap_check_error(mmap_zero)) {

+ 1 - 1
ldso/ldso/ldso.c

@@ -115,7 +115,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, struct elf_resolve *app_tpnt
 	_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;
+	_dl_pagesize = (auxvt[AT_PAGESZ].a_un.a_val)? auxvt[AT_PAGESZ].a_un.a_val : PAGE_SIZE;
 
 	/* 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