about summary refs log tree commit diff
path: root/sysdeps/i386/dl-machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/dl-machine.h')
-rw-r--r--sysdeps/i386/dl-machine.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index fdc9e48e0e..a6d8974ab3 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -384,18 +384,12 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
 }
 
 static inline void
-elf_machine_lazy_rel (struct link_map *map, const Elf32_Rel *reloc)
+elf_machine_lazy_rel (Elf32_Addr l_addr, const Elf32_Rel *reloc)
 {
-  Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
-  switch (ELF32_R_TYPE (reloc->r_info))
-    {
-    case R_386_JMP_SLOT:
-      *reloc_addr += map->l_addr;
-      break;
-    default:
-      assert (! "unexpected PLT reloc type");
-      break;
-    }
+  Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
+  /* Check for unexpected PLT reloc type.  */
+  assert (ELF32_R_TYPE (reloc->r_info) == R_386_JMP_SLOT);
+  *reloc_addr += l_addr;
 }
 
 #endif /* RESOLVE */