summary refs log tree commit diff
path: root/sysdeps/powerpc
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/powerpc
parentc65c9d8ba06fe2b9202a84b31895c7633574bc92 (diff)
downloadglibc-1721af3f967b6bf2d51cb09854fe719d0fbd40ba.tar.gz
glibc-1721af3f967b6bf2d51cb09854fe719d0fbd40ba.tar.xz
glibc-1721af3f967b6bf2d51cb09854fe719d0fbd40ba.zip
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/powerpc')
-rw-r--r--sysdeps/powerpc/dl-machine.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdeps/powerpc/dl-machine.h b/sysdeps/powerpc/dl-machine.h
index 5ea6c46b78..f528dcb9d4 100644
--- a/sysdeps/powerpc/dl-machine.h
+++ b/sysdeps/powerpc/dl-machine.h
@@ -347,7 +347,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
   Elf32_Word loadbase, finaladdr;
   const int rinfo = ELF32_R_TYPE (reloc->r_info);
 
-  if (rinfo == R_PPC_NONE)
+  if (__builtin_expect (rinfo == R_PPC_NONE, 0))
     return;
 
   /* The condition on the next two lines is a hack around a bug in Solaris
@@ -393,6 +393,12 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 			    reloc_addr, finaladdr, rinfo);
 }
 
+static inline void
+elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
+			  Elf32_Addr *const reloc_addr)
+{
+  *reloc_addr = l_addr + reloc->r_addend;
+}
 
 /* The SVR4 ABI specifies that the JMPREL relocs must be inside the
    DT_RELA table.  */