From b92e378086449e2707b8b2fd3d2f50cc0b8871e9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 6 Nov 2007 01:12:33 +0000 Subject: * elf/rtld.c (dl_main): Use the page size to find the map start. --- elf/rtld.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'elf') diff --git a/elf/rtld.c b/elf/rtld.c index 6df81fb..98817d9 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; -- cgit v1.1