summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/rtld.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index 72c81fb00f..5d0244990c 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -143,6 +143,7 @@ _dl_start (void *arg)
 {
   struct link_map bootstrap_map;
   hp_timing_t start_time;
+  size_t cnt;
 
   /* This #define produces dynamic linking inline functions for
      bootstrap relocation instead of general-purpose relocation.  */
@@ -154,6 +155,14 @@ _dl_start (void *arg)
   if (HP_TIMING_INLINE && HP_TIMING_AVAIL)
     HP_TIMING_NOW (start_time);
 
+  /* Partly clean the `bootstrap_map' structure up.  Don't use `memset'
+     since it might nor be built in or inlined and we cannot make function
+     calls at this point.  */
+  for (cnt = 0;
+       cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]);
+       ++cnt)
+    bootstrap_map.l_info[cnt] = 0;
+
   /* Figure out the run-time load address of the dynamic linker itself.  */
   bootstrap_map.l_addr = elf_machine_load_address ();