about summary refs log tree commit diff
path: root/sysdeps/sparc/dl-machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/sparc/dl-machine.h')
-rw-r--r--sysdeps/sparc/dl-machine.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdeps/sparc/dl-machine.h b/sysdeps/sparc/dl-machine.h
index cadf353878..ceaf9eedce 100644
--- a/sysdeps/sparc/dl-machine.h
+++ b/sysdeps/sparc/dl-machine.h
@@ -105,7 +105,12 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
   Elf32_Addr loadbase;
 
   if (ELF32_R_TYPE (reloc->r_info) == R_SPARC_RELATIVE)
-    *reloc_addr += map->l_addr + reloc->r_addend;
+    {
+#ifndef RTLD_BOOTSTRAP
+      if (map != &_dl_rtld_map) /* Already done in rtld itself. */
+#endif
+	*reloc_addr += map->l_addr + reloc->r_addend;
+    }
   else
     {
       Elf32_Addr value;