From 362b037db40a982feb180ce72e2f93efedc48d23 Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 13 Apr 2015 08:35:03 +0000 Subject: [PATCH] MFC r268182: Initialize page sizes early for ia64. git-svn-id: svn://svn.freebsd.org/base/stable/10@281486 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- libexec/rtld-elf/ia64/rtld_machdep.h | 2 ++ libexec/rtld-elf/rtld.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/libexec/rtld-elf/ia64/rtld_machdep.h b/libexec/rtld-elf/ia64/rtld_machdep.h index 4a68ff79d..b00a90fcb 100644 --- a/libexec/rtld-elf/ia64/rtld_machdep.h +++ b/libexec/rtld-elf/ia64/rtld_machdep.h @@ -69,4 +69,6 @@ extern void *__tls_get_addr(unsigned long module, unsigned long offset); #define RTLD_DEFAULT_STACK_PF_EXEC 0 #define RTLD_DEFAULT_STACK_EXEC 0 +#define RTLD_INIT_PAGESIZES_EARLY 1 + #endif diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 94ae21fa3..84d1c80f6 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -1807,6 +1807,11 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info) const Elf_Dyn *dyn_soname; const Elf_Dyn *dyn_runpath; +#ifdef RTLD_INIT_PAGESIZES_EARLY + /* The page size is required by the dynamic memory allocator. */ + init_pagesizes(aux_info); +#endif + /* * Conjure up an Obj_Entry structure for the dynamic linker. * @@ -1843,8 +1848,10 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info) /* Now that non-local variables can be accesses, copy out obj_rtld. */ memcpy(&obj_rtld, &objtmp, sizeof(obj_rtld)); +#ifndef RTLD_INIT_PAGESIZES_EARLY /* The page size is required by the dynamic memory allocator. */ init_pagesizes(aux_info); +#endif if (aux_info[AT_OSRELDATE] != NULL) osreldate = aux_info[AT_OSRELDATE]->a_un.a_val; -- 2.45.0