summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ldso/ldso/dl-startup.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ldso/ldso/dl-startup.c b/ldso/ldso/dl-startup.c
index 5d1d5a67e..b8eb5aa17 100644
--- a/ldso/ldso/dl-startup.c
+++ b/ldso/ldso/dl-startup.c
@@ -133,7 +133,7 @@ DL_BOOT(unsigned long args)
Elf32_Dyn *dpnt;
unsigned long *hash_addr;
struct r_debug *debug_addr = NULL;
- size_t _dl_pagesize;
+ size_t pagesize;
int indx;
#if defined(__i386__)
int status = 0;
@@ -290,8 +290,8 @@ 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 : PAGE_SIZE;
- mmap_zero = malloc_buffer = _dl_mmap((void *) 0, _dl_pagesize,
+ 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, pagesize,
PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
if (_dl_mmap_check_error(mmap_zero)) {
SEND_STDERR("dl_boot: mmap of a spare page failed!\n");
@@ -382,7 +382,7 @@ found_got:
* Even though the program header is marked RWE, the kernel gives
* it to us rx.
*/
- Elf32_Addr mpa = (ppnt->p_vaddr + app_tpnt->loadaddr) & ~(_dl_pagesize - 1);
+ Elf32_Addr mpa = (ppnt->p_vaddr + app_tpnt->loadaddr) & ~(pagesize - 1);
Elf32_Word mps = ((ppnt->p_vaddr + app_tpnt->loadaddr) - mpa) + ppnt->p_memsz;
if(_dl_mprotect(mpa, mps, PROT_READ | PROT_WRITE | PROT_EXEC)) {
SEND_STDERR("Couldn't mprotect .dynamic segment to rwx.\n");