diff options
author | Alan Modra <amodra@gmail.com> | 2013-03-27 13:37:51 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2013-03-27 13:37:51 +0000 |
commit | 7e612e9848387838d6e9bda6e95eac165a25e4ed (patch) | |
tree | 906a46ce51a571acf3adb77065090c48c42d5a43 /bfd/elf64-ppc.c | |
parent | 0bed072fb1753bd88fa624f88b2fd7aeeaf2f3be (diff) | |
download | gdb-7e612e9848387838d6e9bda6e95eac165a25e4ed.zip gdb-7e612e9848387838d6e9bda6e95eac165a25e4ed.tar.gz gdb-7e612e9848387838d6e9bda6e95eac165a25e4ed.tar.bz2 |
* elf-bfd.h (enum elf_reloc_type_class): Add reloc_class_ifunc.
(struct elf_backend_data <elf_backed_reloc_type_class>): Add
bfd_link_info* and asection* params.
(_bfd_elf_reloc_type_class): Likewise.
* elf.c (_bfd_elf_reloc_type_class): Likewise.
* elflink.c (elf_link_sort_cmp2): Sort first on reloc class.
(elf_link_sort_relocs): Update elf_backed_reloc_type_class call.
* elf32-ppc.c (ppc_elf_reloc_type_class): Return reloc_class_ifunc
for any reliplt reloc. Don't return reloc_class_plt for
R_PPC_REL24 and R_PPC_ADDR24.
* elf64-ppc.c (allocate_got): Formatting.
(ppc64_elf_reloc_type_class): Return reloc_class_ifunc for any
reliplt reloc.
* elf-m10300.c, * elf32-arm.c, * elf32-bfin.c, * elf32-cr16.c,
* elf32-cris.c, * elf32-hppa.c, * elf32-i386.c, * elf32-lm32.c,
* elf32-m32r.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c,
* elf32-s390.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilepro.c,
* elf32-vax.c, * elf32-xtensa.c, * elf64-aarch64.c, * elf64-alpha.c,
* elf64-hppa.c, * elf64-ia64-vms.c, * elf64-s390.c, * elf64-sparc.c,
* elf64-x86-64.c, * elfnn-ia64.c, * elfxx-tilegx.c, * elfxx-tilegx.h:
Add extra params to the various reloc_type_class functions.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r-- | bfd/elf64-ppc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 22468ec..9d7c79e 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -8816,8 +8816,8 @@ allocate_got (struct elf_link_hash_entry *h, dyn = htab->elf.dynamic_sections_created; if ((info->shared || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)) - && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT - || h->root.type != bfd_link_hash_undefweak)) + && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT + || h->root.type != bfd_link_hash_undefweak)) { asection *relgot = ppc64_elf_tdata (gent->owner)->relgot; relgot->size += rentsize; @@ -14062,9 +14062,15 @@ ppc64_elf_finish_dynamic_symbol (bfd *output_bfd, dynamic linker, before writing them out. */ static enum elf_reloc_type_class -ppc64_elf_reloc_type_class (const Elf_Internal_Rela *rela) +ppc64_elf_reloc_type_class (const struct bfd_link_info *info, + const asection *rel_sec, + const Elf_Internal_Rela *rela) { enum elf_ppc64_reloc_type r_type; + struct ppc_link_hash_table *htab = ppc_hash_table (info); + + if (rel_sec == htab->reliplt) + return reloc_class_ifunc; r_type = ELF64_R_TYPE (rela->r_info); switch (r_type) |