- h->got.offset = htab->sgot->size;
- htab->sgot->size += got_entry_size;
- if (info->shared)
- htab->srelgot->size += sizeof_reloc;
- }
-
- return TRUE;
-}
-
-/* Similar to _bfd_elf_get_synthetic_symtab, optimized for unsorted PLT
- entries. PLT is the PLT section. PLT_SYM_VAL is a function pointer
- which returns an array of PLT entry symbol values. */
-
-long
-_bfd_elf_ifunc_get_synthetic_symtab
- (bfd *abfd, long symcount ATTRIBUTE_UNUSED,
- asymbol **syms ATTRIBUTE_UNUSED, long dynsymcount, asymbol **dynsyms,
- asymbol **ret, asection *plt,
- bfd_vma *(*get_plt_sym_val) (bfd *, asymbol **, asection *, asection *))
-{
- const struct elf_backend_data *bed = get_elf_backend_data (abfd);
- asection *relplt;
- asymbol *s;
- const char *relplt_name;
- bfd_boolean (*slurp_relocs) (bfd *, asection *, asymbol **, bfd_boolean);
- arelent *p;
- long count, i, n;
- size_t size;
- Elf_Internal_Shdr *hdr;
- char *names;
- bfd_vma *plt_sym_val;
-
- *ret = NULL;
-
- if (plt == NULL)
- return 0;
-
- if ((abfd->flags & (DYNAMIC | EXEC_P)) == 0)
- return 0;
-
- if (dynsymcount <= 0)
- return 0;
-
- relplt_name = bed->relplt_name;
- if (relplt_name == NULL)
- relplt_name = bed->rela_plts_and_copies_p ? ".rela.plt" : ".rel.plt";
- relplt = bfd_get_section_by_name (abfd, relplt_name);
- if (relplt == NULL)
- return 0;
-
- hdr = &elf_section_data (relplt)->this_hdr;
- if (hdr->sh_link != elf_dynsymtab (abfd)
- || (hdr->sh_type != SHT_REL && hdr->sh_type != SHT_RELA))
- return 0;
-
- slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table;
- if (! (*slurp_relocs) (abfd, relplt, dynsyms, TRUE))
- return -1;
-
- count = relplt->size / hdr->sh_entsize;
- size = count * sizeof (asymbol);
- p = relplt->relocation;
- for (i = 0; i < count; i++, p += bed->s->int_rels_per_ext_rel)
- {
- size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt");
- if (p->addend != 0)