aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ia64
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-24 08:53:35 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-24 08:53:35 +0000
commit1721af3f967b6bf2d51cb09854fe719d0fbd40ba (patch)
tree7b8b881d877864ab9596fc5bc5586586bdf6006b /sysdeps/ia64
parentc65c9d8ba06fe2b9202a84b31895c7633574bc92 (diff)
downloadglibc-1721af3f967b6bf2d51cb09854fe719d0fbd40ba.zip
glibc-1721af3f967b6bf2d51cb09854fe719d0fbd40ba.tar.gz
glibc-1721af3f967b6bf2d51cb09854fe719d0fbd40ba.tar.bz2
Update.
2001-08-24 Ulrich Drepper <drepper@redhat.com> * elf/do-rel.h (elf_dynamic_do_rel): If not relocating lazily, don't call elf_machine_rel for the last DT_RELCOUNT relocations but instead elf_machine_rel_relative. * sysdeps/alpha/dl-machine.h: Define elf_machine_rel_relative. Minor optimizations. * sysdeps/arm/dl-machine.h: Likewise. * sysdeps/cris/dl-machine.h: Likewise. * sysdeps/hppa/dl-machine.h: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/ia64/dl-machine.h: Likewise. * sysdeps/m68k/dl-machine.h: Likewise. * sysdeps/mips/dl-machine.h: Likewise. * sysdeps/powerpc/dl-machine.h: Likewise. * sysdeps/s390/s390-32/dl-machine.h: Likewise. * sysdeps/s390/s390-64/dl-machine.h: Likewise. * sysdeps/sh/dl-machine.h: Likewise. * sysdeps/sparc/sparc32/dl-machine.h: Likewise. * sysdeps/sparc/sparc64/dl-machine.h: Likewise.
Diffstat (limited to 'sysdeps/ia64')
-rw-r--r--sysdeps/ia64/dl-machine.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/sysdeps/ia64/dl-machine.h b/sysdeps/ia64/dl-machine.h
index a2192a1..8123515 100644
--- a/sysdeps/ia64/dl-machine.h
+++ b/sysdeps/ia64/dl-machine.h
@@ -520,8 +520,10 @@ elf_machine_rela (struct link_map *map,
/* We cannot use a switch here because we cannot locate the switch
jump table until we've self-relocated. */
- if (R_IA64_TYPE (r_type) == R_IA64_TYPE (R_IA64_REL64LSB))
+ if (__builtin_expect (R_IA64_TYPE (r_type) == R_IA64_TYPE (R_IA64_REL64LSB),
+ 0))
{
+ assert (ELF64_R_TYPE (reloc->r_info) == R_IA64_REL64LSB);
value = *reloc_addr;
#ifndef RTLD_BOOTSTRAP
/* Already done in dynamic linker. */
@@ -529,8 +531,10 @@ elf_machine_rela (struct link_map *map,
#endif
value += map->l_addr;
}
+#ifndef RTLD_BOOTSTRAP
else if (r_type == R_IA64_NONE)
return;
+#endif
else
{
struct link_map *sym_map;
@@ -575,6 +579,15 @@ elf_machine_rela (struct link_map *map,
assert (! "unexpected dynamic reloc format");
}
+static inline void
+elf_machine_rel_relative (Elf64_Addr l_addr, const Elf64_Rel *reloc,
+ Elf64_Addr *const reloc_addr)
+{
+ /* ??? Ignore MSB and Instruction format for now. */
+ assert (ELF64_R_TYPE (reloc->r_info) == R_IA64_REL64LSB);
+
+ *reloc_addr += l_addr;
+}
/* Perform a RELATIVE reloc on the .got entry that transfers to the .plt. */
static inline void