aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-10-03 01:55:00 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-10-03 01:55:12 -0700
commitb8818ab592ce1012d481604284f66552bd451910 (patch)
tree9f61e899f037ee8118ec01b0c2501a0df00880c1 /sysdeps
parent3d1870fa3301c5cd00d5fdab0014c4e22b71fef2 (diff)
downloadglibc-b8818ab592ce1012d481604284f66552bd451910.zip
glibc-b8818ab592ce1012d481604284f66552bd451910.tar.gz
glibc-b8818ab592ce1012d481604284f66552bd451910.tar.bz2
ld.so: Replace (&bootstrap_map) with BOOTSTRAP_MAP
(&_dl_main_map) is used instead of (&bootstrap_map) to bootstrap static PIE. Define BOOTSTRAP_MAP with (&_dl_main_map) to avoid hardcode to (&bootstrap_map). * elf/rtld.c (BOOTSTRAP_MAP): New. (RESOLVE_MAP): Replace (&bootstrap_map) with BOOTSTRAP_MAP. * sysdeps/hppa/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC): Likewise. * sysdeps/ia64/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC): Likewise. * sysdeps/mips/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC): Likewise.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/hppa/dl-machine.h2
-rw-r--r--sysdeps/ia64/dl-machine.h2
-rw-r--r--sysdeps/mips/dl-machine.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index e24bd25..acfb9fc 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -62,7 +62,7 @@ __hppa_init_bootstrap_fdesc_table (struct link_map *map)
}
#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \
- __hppa_init_bootstrap_fdesc_table (&bootstrap_map); \
+ __hppa_init_bootstrap_fdesc_table (BOOTSTRAP_MAP); \
_dl_fptr_init();
/* Return nonzero iff ELF header is compatible with the running host. */
diff --git a/sysdeps/ia64/dl-machine.h b/sysdeps/ia64/dl-machine.h
index 8d0d3c9..b56f1c8 100644
--- a/sysdeps/ia64/dl-machine.h
+++ b/sysdeps/ia64/dl-machine.h
@@ -45,7 +45,7 @@ __ia64_init_bootstrap_fdesc_table (struct link_map *map)
}
#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \
- __ia64_init_bootstrap_fdesc_table (&bootstrap_map);
+ __ia64_init_bootstrap_fdesc_table (BOOTSTRAP_MAP);
/* Return nonzero iff ELF header is compatible with the running host. */
static inline int __attribute__ ((unused))
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 8e9f685..b4fee49 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -195,7 +195,7 @@ elf_machine_load_address (void)
fiddles with global data. */
#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \
do { \
- struct link_map *map = &bootstrap_map; \
+ struct link_map *map = BOOTSTRAP_MAP; \
ElfW(Sym) *sym; \
ElfW(Addr) *got; \
int i, n; \