aboutsummaryrefslogtreecommitdiff
path: root/elf/do-rel.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-02-02 07:26:22 +0000
committerUlrich Drepper <drepper@redhat.com>2002-02-02 07:26:22 +0000
commite0f418860056d884a03be8344eeeb60759ea86e2 (patch)
tree13dee6431774420fb6c41bdef59142d796f58cd2 /elf/do-rel.h
parent56c574425d7bf24ee32f26b947e1e013b1787402 (diff)
downloadglibc-e0f418860056d884a03be8344eeeb60759ea86e2.tar
glibc-e0f418860056d884a03be8344eeeb60759ea86e2.tar.gz
glibc-e0f418860056d884a03be8344eeeb60759ea86e2.tar.bz2
glibc-e0f418860056d884a03be8344eeeb60759ea86e2.zip
Update.
* elf/do-rel.h (elf_dynamic_do_rel): Help the compiler recognize code which is never used when relocating ld.so itself. (_ELF_DYNAMIC_DO_RELOC): Help the compiler optimize a bit.
Diffstat (limited to 'elf/do-rel.h')
-rw-r--r--elf/do-rel.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/elf/do-rel.h b/elf/do-rel.h
index 3968937093..5f07544369 100644
--- a/elf/do-rel.h
+++ b/elf/do-rel.h
@@ -98,7 +98,12 @@ elf_dynamic_do_rel (struct link_map *map,
elf_machine_rel_relative (l_addr, relative,
(void *) (l_addr + relative->r_offset));
+#ifdef RTLD_BOOTSTRAP
+ /* The dynamic linker always uses versioning. */
+ assert (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL);
+#else
if (map->l_info[VERSYMIDX (DT_VERSYM)])
+#endif
{
const ElfW(Half) *const version =
(const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]);
@@ -111,10 +116,12 @@ elf_dynamic_do_rel (struct link_map *map,
(void *) (l_addr + r->r_offset));
}
}
+#ifndef RTLD_BOOTSTRAP
else
for (; r < end; ++r)
elf_machine_rel (map, r, &symtab[ELFW(R_SYM) (r->r_info)], NULL,
(void *) (l_addr + r->r_offset));
+#endif
}
}