aboutsummaryrefslogtreecommitdiff
path: root/elf/rtld.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/rtld.c')
-rw-r--r--elf/rtld.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index 6df81fb2c1..98817d9fa0 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -1166,7 +1166,8 @@ of this helper program; chances are you did not intend to run this program.\n\
ElfW(Addr) allocend;
/* Remember where the main program starts in memory. */
- mapstart = (main_map->l_addr + (ph->p_vaddr & ~(ph->p_align - 1)));
+ mapstart = (main_map->l_addr
+ + (ph->p_vaddr & ~(GLRO(dl_pagesize) - 1)));
if (main_map->l_map_start > mapstart)
main_map->l_map_start = mapstart;