about summary refs log tree commit diff
path: root/sysdeps/hppa/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/hppa/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/hppa/dl-machine.h')
-rw-r--r--sysdeps/hppa/dl-machine.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index 9cc10c40f7..cd180e7f76 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -1,5 +1,6 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  PA-RISC version.
-   Copyright (C) 1995-1997,1999,2000,2001,2002 Free Software Foundation, Inc.
+   Copyright (C) 1995-1997,1999,2000,2001,2002, 2003
+	Free Software Foundation, Inc.
    Contributed by David Huggins-Daines <dhd@debian.org>
    This file is part of the GNU C Library.
 
@@ -481,8 +482,9 @@ asm (									\
 static inline void
 elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 		  const Elf32_Sym *sym, const struct r_found_version *version,
-		  Elf32_Addr *const reloc_addr)
+		  void *const reloc_addr_arg)
 {
+  Elf32_Addr *const reloc_addr = reloc_addr_arg;
   const Elf32_Sym *const refsym = sym;
   unsigned long const r_type = ELF32_R_TYPE (reloc->r_info);
   struct link_map *sym_map;
@@ -531,9 +533,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 	return;
 #endif
       /* .eh_frame can have unaligned relocs.  */
-      if ((unsigned long) reloc_addr & 3)
+      if ((unsigned long) reloc_addr_arg & 3)
 	{
-	  char *rel_addr = (char *) reloc_addr;
+	  char *rel_addr = (char *) reloc_addr_arg;
 	  rel_addr[0] = value >> 24;
 	  rel_addr[1] = value >> 16;
 	  rel_addr[2] = value >> 8;
@@ -614,7 +616,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 			    rtld_progname ?: "<program name unknown>",
 			    strtab + refsym->st_name);
 	}
-      memcpy (reloc_addr, (void *) value,
+      memcpy (reloc_addr_arg, (void *) value,
 	      MIN (sym->st_size, refsym->st_size));
       return;
 
@@ -637,8 +639,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 static inline void
 elf_machine_rela_relative (struct link_map *map, Elf32_Addr l_addr,
 			   const Elf32_Rela *reloc,
-			   Elf32_Addr *const reloc_addr)
+			   void *const reloc_addr_arg)
 {
+  Elf32_Addr *const reloc_addr = reloc_addr_arg;
   unsigned long const r_type = ELF32_R_TYPE (reloc->r_info);
   Elf32_Addr value;
 
@@ -651,9 +654,9 @@ elf_machine_rela_relative (struct link_map *map, Elf32_Addr l_addr,
     {
     case R_PARISC_DIR32:
       /* .eh_frame can have unaligned relocs.  */
-      if ((unsigned long) reloc_addr & 3)
+      if ((unsigned long) reloc_addr_arg & 3)
 	{
-	  char *rel_addr = (char *) reloc_addr;
+	  char *rel_addr = (char *) reloc_addr_arg;
 	  rel_addr[0] = value >> 24;
 	  rel_addr[1] = value >> 16;
 	  rel_addr[2] = value >> 8;