diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2003-07-31 06:33:53 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2003-07-31 06:33:53 +0000 |
commit | 87d254a7bf02b60e6cd0699ddca6105b3ea232c9 (patch) | |
tree | 8a8121db8c86680e1a9d34acdc844f73f8962bcf /sysdeps/powerpc/powerpc64/dl-machine.h | |
parent | e4a6507c4c50580521b80970bfae00df472a549c (diff) | |
download | glibc-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/powerpc/powerpc64/dl-machine.h')
-rw-r--r-- | sysdeps/powerpc/powerpc64/dl-machine.h | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/sysdeps/powerpc/powerpc64/dl-machine.h b/sysdeps/powerpc/powerpc64/dl-machine.h index 7f0353f687..843737eb86 100644 --- a/sysdeps/powerpc/powerpc64/dl-machine.h +++ b/sysdeps/powerpc/powerpc64/dl-machine.h @@ -565,8 +565,9 @@ extern void _dl_reloc_overflow (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) { + Elf64_Addr *const reloc_addr = reloc_addr_arg; *reloc_addr = l_addr + reloc->r_addend; } @@ -598,8 +599,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; const int r_type = ELF64_R_TYPE (reloc->r_info); #ifndef RTLD_BOOTSTRAP const Elf64_Sym *const refsym = sym; @@ -766,27 +768,28 @@ elf_machine_rela (struct link_map *map, _dl_argv[0] ?: "<program name unknown>", strtab + refsym->st_name); } - memcpy (reloc_addr, (char *) value, MIN (sym->st_size, refsym->st_size)); + memcpy (reloc_addr_arg, (char *) value, + MIN (sym->st_size, refsym->st_size)); return; case R_PPC64_UADDR64: /* We are big-endian. */ - ((char *) reloc_addr)[0] = (value >> 56) & 0xff; - ((char *) reloc_addr)[1] = (value >> 48) & 0xff; - ((char *) reloc_addr)[2] = (value >> 40) & 0xff; - ((char *) reloc_addr)[3] = (value >> 32) & 0xff; - ((char *) reloc_addr)[4] = (value >> 24) & 0xff; - ((char *) reloc_addr)[5] = (value >> 16) & 0xff; - ((char *) reloc_addr)[6] = (value >> 8) & 0xff; - ((char *) reloc_addr)[7] = (value >> 0) & 0xff; + ((char *) reloc_addr_arg)[0] = (value >> 56) & 0xff; + ((char *) reloc_addr_arg)[1] = (value >> 48) & 0xff; + ((char *) reloc_addr_arg)[2] = (value >> 40) & 0xff; + ((char *) reloc_addr_arg)[3] = (value >> 32) & 0xff; + ((char *) reloc_addr_arg)[4] = (value >> 24) & 0xff; + ((char *) reloc_addr_arg)[5] = (value >> 16) & 0xff; + ((char *) reloc_addr_arg)[6] = (value >> 8) & 0xff; + ((char *) reloc_addr_arg)[7] = (value >> 0) & 0xff; return; case R_PPC64_UADDR32: /* We are big-endian. */ - ((char *) reloc_addr)[0] = (value >> 24) & 0xff; - ((char *) reloc_addr)[1] = (value >> 16) & 0xff; - ((char *) reloc_addr)[2] = (value >> 8) & 0xff; - ((char *) reloc_addr)[3] = (value >> 0) & 0xff; + ((char *) reloc_addr_arg)[0] = (value >> 24) & 0xff; + ((char *) reloc_addr_arg)[1] = (value >> 16) & 0xff; + ((char *) reloc_addr_arg)[2] = (value >> 8) & 0xff; + ((char *) reloc_addr_arg)[3] = (value >> 0) & 0xff; return; case R_PPC64_ADDR32: @@ -811,8 +814,8 @@ elf_machine_rela (struct link_map *map, if (dont_expect ((value + 0x8000) >= 0x10000)) _dl_reloc_overflow (map, "R_PPC64_UADDR16", reloc_addr, refsym); /* We are big-endian. */ - ((char *) reloc_addr)[0] = (value >> 8) & 0xff; - ((char *) reloc_addr)[1] = (value >> 0) & 0xff; + ((char *) reloc_addr_arg)[0] = (value >> 8) & 0xff; + ((char *) reloc_addr_arg)[1] = (value >> 0) & 0xff; break; case R_PPC64_ADDR16_DS: |