summaryrefslogtreecommitdiff
path: root/elf/rtld.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/rtld.c')
-rw-r--r--elf/rtld.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index 8d2bba3d43..0c27e5d486 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -500,13 +500,9 @@ _dl_start_final (void *arg, struct dl_start_final_info *info)
return start_addr;
}
-static ElfW(Addr) __attribute_used__
-_dl_start (void *arg)
-{
#ifdef DONT_USE_BOOTSTRAP_MAP
# define bootstrap_map GL(dl_rtld_map)
#else
- struct dl_start_final_info info;
# define bootstrap_map info.l
#endif
@@ -515,13 +511,16 @@ _dl_start (void *arg)
Since ld.so must not have any undefined symbols the result
is trivial: always the map of ld.so itself. */
#define RTLD_BOOTSTRAP
-#define BOOTSTRAP_MAP (&bootstrap_map)
-#define RESOLVE_MAP(sym, version, flags) BOOTSTRAP_MAP
+#define RESOLVE_MAP(map, scope, sym, version, flags) map
#include "dynamic-link.h"
+static ElfW(Addr) __attribute_used__
+_dl_start (void *arg)
+{
#ifdef DONT_USE_BOOTSTRAP_MAP
rtld_timer_start (&start_time);
#else
+ struct dl_start_final_info info;
rtld_timer_start (&info.start_time);
#endif
@@ -554,7 +553,7 @@ _dl_start (void *arg)
#endif
#ifdef ELF_MACHINE_BEFORE_RTLD_RELOC
- ELF_MACHINE_BEFORE_RTLD_RELOC (bootstrap_map.l_info);
+ ELF_MACHINE_BEFORE_RTLD_RELOC (&bootstrap_map, bootstrap_map.l_info);
#endif
if (bootstrap_map.l_addr || ! bootstrap_map.l_info[VALIDX(DT_GNU_PRELINKED)])
@@ -562,7 +561,7 @@ _dl_start (void *arg)
/* Relocate ourselves so we can do normal function calls and
data access using the global offset table. */
- ELF_DYNAMIC_RELOCATE (&bootstrap_map, 0, 0, 0);
+ ELF_DYNAMIC_RELOCATE (&bootstrap_map, NULL, 0, 0, 0);
}
bootstrap_map.l_relocated = 1;