diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-05-16 04:22:23 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-05-16 04:22:23 +0000 |
commit | 63c7a7e8a99489497572e0cf81aee5c3bc77d1c2 (patch) | |
tree | a398a2750f5a65cdedf9ab10aa4ceb637ec014e2 /sysdeps/powerpc/powerpc64 | |
parent | 115a45a7209e380578d36d83016700c5a2d8252e (diff) | |
download | glibc-63c7a7e8a99489497572e0cf81aee5c3bc77d1c2.tar.gz |
Update.
2003-05-15 Jakub Jelinek <jakub@redhat.com>
* sysdeps/powerpc/powerpc32/dl-machine.c (_dl_reloc_overflow):
Remove sym argument, always use refsym.
(__process_machine_rela): Adjust callers.
* sysdeps/powerpc/powerpc64/dl-machine.c (_dl_reloc_overflow):
Likewise.
* sysdeps/powerpc/powerpc32/dl-machine.h (_dl_reloc_overflow):
Adjust prototype.
* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela): Likewise.
Diffstat (limited to 'sysdeps/powerpc/powerpc64')
-rw-r--r-- | sysdeps/powerpc/powerpc64/dl-machine.c | 8 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/dl-machine.h | 27 |
2 files changed, 14 insertions, 21 deletions
diff --git a/sysdeps/powerpc/powerpc64/dl-machine.c b/sysdeps/powerpc/powerpc64/dl-machine.c index bbaedc8335..167af998a7 100644 --- a/sysdeps/powerpc/powerpc64/dl-machine.c +++ b/sysdeps/powerpc/powerpc64/dl-machine.c @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation functions. PowerPC64 version. - Copyright (C) 1995,96,97,98,99,2000,01, 2002 Free Software Foundation, Inc. + Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,22 +27,20 @@ void _dl_reloc_overflow (struct link_map *map, const char *name, Elf64_Addr *const reloc_addr, - const Elf64_Sym *sym, const Elf64_Sym *refsym) { char buffer[128]; char *t; - const Elf64_Sym *errsym = sym ?: refsym; t = stpcpy (buffer, name); t = stpcpy (t, " reloc at 0x"); _itoa_word ((unsigned long) reloc_addr, t, 16, 0); - if (errsym) + if (refsym) { const char *strtab; strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); t = stpcpy (t, " for symbol `"); - t = stpcpy (t, strtab + errsym->st_name); + t = stpcpy (t, strtab + refsym->st_name); t = stpcpy (t, "'"); } t = stpcpy (t, " out of range"); diff --git a/sysdeps/powerpc/powerpc64/dl-machine.h b/sysdeps/powerpc/powerpc64/dl-machine.h index e965d6a4e9..1922d2a01a 100644 --- a/sysdeps/powerpc/powerpc64/dl-machine.h +++ b/sysdeps/powerpc/powerpc64/dl-machine.h @@ -533,7 +533,6 @@ elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc, extern void _dl_reloc_overflow (struct link_map *map, const char *name, Elf64_Addr *const reloc_addr, - const Elf64_Sym *sym, const Elf64_Sym *refsym) attribute_hidden; @@ -637,8 +636,7 @@ elf_machine_rela (struct link_map *map, case R_PPC64_TPREL16_LO_DS: value = elf_machine_tprel (map, sym_map, sym, reloc); if (dont_expect ((value & 3) != 0)) - _dl_reloc_overflow (map, "R_PPC64_TPREL16_LO_DS", - reloc_addr, sym, refsym); + _dl_reloc_overflow (map, "R_PPC64_TPREL16_LO_DS", reloc_addr, refsym); *(Elf64_Half *) reloc_addr = BIT_INSERT (*(Elf64_Half *) reloc_addr, value, 0xfffc); break; @@ -646,8 +644,7 @@ elf_machine_rela (struct link_map *map, case R_PPC64_TPREL16_DS: value = elf_machine_tprel (map, sym_map, sym, reloc); if (dont_expect ((value + 0x8000) >= 0x10000 || (value & 3) != 0)) - _dl_reloc_overflow (map, "R_PPC64_TPREL16_DS", reloc_addr, - sym, refsym); + _dl_reloc_overflow (map, "R_PPC64_TPREL16_DS", reloc_addr, refsym); *(Elf64_Half *) reloc_addr = BIT_INSERT (*(Elf64_Half *) reloc_addr, value, 0xfffc); break; @@ -655,8 +652,7 @@ elf_machine_rela (struct link_map *map, case R_PPC64_TPREL16: value = elf_machine_tprel (map, sym_map, sym, reloc); if (dont_expect ((value + 0x8000) >= 0x10000)) - _dl_reloc_overflow (map, "R_PPC64_TPREL16", reloc_addr, - sym, refsym); + _dl_reloc_overflow (map, "R_PPC64_TPREL16", reloc_addr, refsym); *(Elf64_Half *) reloc_addr = PPC_LO (value); break; @@ -699,8 +695,7 @@ elf_machine_rela (struct link_map *map, #ifndef RTLD_BOOTSTRAP /* None of the following appear in ld.so */ case R_PPC64_ADDR16_LO_DS: if (dont_expect ((value & 3) != 0)) - _dl_reloc_overflow (map, "R_PPC64_ADDR16_LO_DS", - reloc_addr, sym, refsym); + _dl_reloc_overflow (map, "R_PPC64_ADDR16_LO_DS", reloc_addr, refsym); BIT_INSERT (*(Elf64_Half *) reloc_addr, value, 0xfffc); break; @@ -721,7 +716,7 @@ elf_machine_rela (struct link_map *map, Elf64_Addr delta = value - (Elf64_Xword) reloc_addr; if (dont_expect ((delta + 0x80000000) >= 0x10000000 || (delta & 3) != 0)) - _dl_reloc_overflow (map, "R_PPC64_ADDR30", reloc_addr, sym, refsym); + _dl_reloc_overflow (map, "R_PPC64_ADDR30", reloc_addr, refsym); BIT_INSERT (*(Elf64_Word *) reloc_addr, delta, 0xfffffffc); } break; @@ -767,25 +762,25 @@ elf_machine_rela (struct link_map *map, case R_PPC64_ADDR32: if (dont_expect ((value + 0x80000000) >= 0x10000000)) - _dl_reloc_overflow (map, "R_PPC64_ADDR32", reloc_addr, sym, refsym); + _dl_reloc_overflow (map, "R_PPC64_ADDR32", reloc_addr, refsym); *(Elf64_Word *) reloc_addr = value; return; case R_PPC64_ADDR24: if (dont_expect ((value + 0x2000000) >= 0x4000000 || (value & 3) != 0)) - _dl_reloc_overflow (map, "R_PPC64_ADDR24", reloc_addr, sym, refsym); + _dl_reloc_overflow (map, "R_PPC64_ADDR24", reloc_addr, refsym); BIT_INSERT (*(Elf64_Word *) reloc_addr, value, 0x3fffffc); break; case R_PPC64_ADDR16: if (dont_expect ((value + 0x8000) >= 0x10000)) - _dl_reloc_overflow (map, "R_PPC64_ADDR16", reloc_addr, sym, refsym); + _dl_reloc_overflow (map, "R_PPC64_ADDR16", reloc_addr, refsym); *(Elf64_Half *) reloc_addr = value; break; case R_PPC64_UADDR16: if (dont_expect ((value + 0x8000) >= 0x10000)) - _dl_reloc_overflow (map, "R_PPC64_UADDR16", reloc_addr, sym, refsym); + _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; @@ -793,7 +788,7 @@ elf_machine_rela (struct link_map *map, case R_PPC64_ADDR16_DS: if (dont_expect ((value + 0x8000) >= 0x10000 || (value & 3) != 0)) - _dl_reloc_overflow (map, "R_PPC64_ADDR16_DS", reloc_addr, sym, refsym); + _dl_reloc_overflow (map, "R_PPC64_ADDR16_DS", reloc_addr, refsym); BIT_INSERT (*(Elf64_Half *) reloc_addr, value, 0xfffc); break; @@ -818,7 +813,7 @@ elf_machine_rela (struct link_map *map, case R_PPC64_ADDR14_BRNTAKEN: { if (dont_expect ((value + 0x8000) >= 0x10000 || (value & 3) != 0)) - _dl_reloc_overflow (map, "R_PPC64_ADDR14", reloc_addr, sym, refsym); + _dl_reloc_overflow (map, "R_PPC64_ADDR14", reloc_addr, refsym); Elf64_Word insn = *(Elf64_Word *) reloc_addr; BIT_INSERT (insn, value, 0xfffc); if (r_type != R_PPC64_ADDR14) |