about summary refs log tree commit diff
path: root/sysdeps/alpha/dl-machine.h
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2003-07-31 06:33:53 +0000
committerAlexandre Oliva <aoliva@redhat.com>2003-07-31 06:33:53 +0000
commit87d254a7bf02b60e6cd0699ddca6105b3ea232c9 (patch)
tree8a8121db8c86680e1a9d34acdc844f73f8962bcf /sysdeps/alpha/dl-machine.h
parente4a6507c4c50580521b80970bfae00df472a549c (diff)
downloadglibc-87d254a7bf02b60e6cd0699ddca6105b3ea232c9.tar.gz
glibc-87d254a7bf02b60e6cd0699ddca6105b3ea232c9.tar.xz
glibc-87d254a7bf02b60e6cd0699ddca6105b3ea232c9.zip
* elf/dynamic-link.h (elf_machine_rel, elf_machine_rela, elf_machine_rel_relative, elf_machine_rela_relative): Don't assume reloc_addr is aligned. * sysdeps/alpha/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/arm/dl-machine.h (elf_machine_rel, elf_machine_rela, elf_machine_rel_relative, elf_machine_rela_relative): Adjust. * sysdeps/cris/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/hppa/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/i386/dl-machine.h (elf_machine_rel, elf_machine_rela, elf_machine_rel_relative, elf_machine_rela_relative): Adjust. * sysdeps/ia64/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/m68k/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/mips/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela_relative, elf_machine_rela): Adjust. * sysdeps/s390/s390-32/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/s390/s390-64/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): * sysdeps/sh/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust. * sysdeps/x86_64/dl-machine.h (elf_machine_rela, elf_machine_rela_relative): Adjust.
2003-07-31  Alexandre Oliva  <aoliva@redhat.com>

	* elf/dynamic-link.h (elf_machine_rel, elf_machine_rela,
	elf_machine_rel_relative, elf_machine_rela_relative): Don't assume
	reloc_addr is aligned.
	* sysdeps/alpha/dl-machine.h (elf_machine_rela,
	elf_machine_rela_relative): Adjust.
	* sysdeps/arm/dl-machine.h (elf_machine_rel, elf_machine_rela,
	elf_machine_rel_relative, elf_machine_rela_relative): Adjust.
	* sysdeps/cris/dl-machine.h (elf_machine_rela,
	elf_machine_rela_relative): Adjust.
	* sysdeps/hppa/dl-machine.h (elf_machine_rela,
	elf_machine_rela_relative): Adjust.
	* sysdeps/i386/dl-machine.h (elf_machine_rel, elf_machine_rela,
	elf_machine_rel_relative, elf_machine_rela_relative): Adjust.
	* sysdeps/ia64/dl-machine.h (elf_machine_rela,
	elf_machine_rela_relative): Adjust.
	* sysdeps/m68k/dl-machine.h (elf_machine_rela,
	elf_machine_rela_relative): Adjust.
	* sysdeps/mips/dl-machine.h (elf_machine_rela,
	elf_machine_rela_relative): Adjust.
	* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela,
	elf_machine_rela_relative): Adjust.
	* sysdeps/powerpc/powerpc64/dl-machine.h
	(elf_machine_rela_relative, elf_machine_rela): Adjust.
	* sysdeps/s390/s390-32/dl-machine.h (elf_machine_rela,
	elf_machine_rela_relative): Adjust.
	* sysdeps/s390/s390-64/dl-machine.h (elf_machine_rela,
	elf_machine_rela_relative): 
	* sysdeps/sh/dl-machine.h (elf_machine_rela,
	elf_machine_rela_relative): Adjust.
	* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela,
	elf_machine_rela_relative): Adjust.
	* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela,
	elf_machine_rela_relative): Adjust.
	* sysdeps/x86_64/dl-machine.h (elf_machine_rela,
	elf_machine_rela_relative): Adjust.
Diffstat (limited to 'sysdeps/alpha/dl-machine.h')
-rw-r--r--sysdeps/alpha/dl-machine.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 0101ba43d5..b3c1eac695 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -512,8 +512,9 @@ elf_machine_rela (struct link_map *map,
 		  const Elf64_Rela *reloc,
 		  const Elf64_Sym *sym,
 		  const struct r_found_version *version,
-		  Elf64_Addr *const reloc_addr)
+		  void *const reloc_addr_arg)
 {
+  Elf64_Addr *const reloc_addr = reloc_addr_arg;
   unsigned long int const r_type = ELF64_R_TYPE (reloc->r_info);
 
 #if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC && !defined SHARED
@@ -538,15 +539,14 @@ elf_machine_rela (struct link_map *map,
 	{
 	  /* XXX Make some timings.  Maybe it's preferable to test for
 	     unaligned access and only do it the complex way if necessary.  */
-	  void *reloc_addr_1 = reloc_addr;
 	  Elf64_Addr reloc_addr_val;
 
 	  /* Load value without causing unaligned trap. */
-	  memcpy (&reloc_addr_val, reloc_addr_1, 8);
+	  memcpy (&reloc_addr_val, reloc_addr_arg, 8);
 	  reloc_addr_val += map->l_addr;
 
 	  /* Store value without causing unaligned trap. */
-	  memcpy (reloc_addr_1, &reloc_addr_val, 8);
+	  memcpy (reloc_addr_arg, &reloc_addr_val, 8);
 	}
     }
   else
@@ -598,10 +598,8 @@ elf_machine_rela (struct link_map *map,
 #ifndef RTLD_BOOTSTRAP
       else if (r_type == R_ALPHA_REFQUAD)
 	{
-	  void *reloc_addr_1 = reloc_addr;
-
 	  /* Store value without causing unaligned trap.  */
-	  memcpy (reloc_addr_1, &sym_value, 8);
+	  memcpy (reloc_addr_arg, &sym_value, 8);
 	}
 #endif
 #if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD)
@@ -649,19 +647,18 @@ elf_machine_rela (struct link_map *map,
 
 static inline void
 elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
-			   Elf64_Addr *const reloc_addr)
+			   void *const reloc_addr_arg)
 {
-  /* XXX Make some timings.  Maybe it's preverable to test for
+  /* XXX Make some timings.  Maybe it's preferable to test for 
      unaligned access and only do it the complex way if necessary.  */
-  void *reloc_addr_1 = reloc_addr;
   Elf64_Addr reloc_addr_val;
 
   /* Load value without causing unaligned trap. */
-  memcpy (&reloc_addr_val, reloc_addr_1, 8);
+  memcpy (&reloc_addr_val, reloc_addr_arg, 8);
   reloc_addr_val += l_addr;
 
   /* Store value without causing unaligned trap. */
-  memcpy (reloc_addr_1, &reloc_addr_val, 8);
+  memcpy (reloc_addr_arg, &reloc_addr_val, 8);
 }
 
 static inline void