/* IBM S/390-specific support for ELF 32 and 64 bit functions
- Copyright (C) 2000-2015 Free Software Foundation, Inc.
+ Copyright (C) 2000-2016 Free Software Foundation, Inc.
Contributed by Andreas Krebbel.
This file is part of BFD, the Binary File Descriptor library.
static bfd_boolean
s390_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info,
- struct elf_link_hash_entry *h,
- struct elf_dyn_relocs **head)
+ struct elf_link_hash_entry *h)
{
struct elf_dyn_relocs *p;
struct elf_link_hash_table *htab;
struct elf_s390_link_hash_entry *eh = (struct elf_s390_link_hash_entry*)h;
+ struct elf_dyn_relocs **head = &eh->dyn_relocs;
htab = elf_hash_table (info);
eh->ifunc_resolver_address = h->root.u.def.value;
point to the IPLT slot. That way the referencing shared lib will
always get the PLT slot address when resolving the respective
R_390_GLOB_DAT/R_390_64 relocs on that symbol. */
- if (bfd_link_executable (info)
- && !bfd_link_pic (info)
+ if (bfd_link_pde (info)
&& h->def_regular
&& h->ref_dynamic)
{
if (h->got.refcount <= 0
|| (bfd_link_pic (info)
&& (h->dynindx == -1 || h->forced_local))
- || (bfd_link_executable (info) && bfd_link_pic (info))
+ || bfd_link_pie (info)
|| htab->sgot == NULL)
{
/* Use .got.iplt. */
asection **secp ATTRIBUTE_UNUSED,
bfd_vma *valp ATTRIBUTE_UNUSED)
{
- if ((ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
- || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
+ if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
&& (abfd->flags & DYNAMIC) == 0
&& bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
- elf_tdata (info->output_bfd)->has_gnu_symbols = elf_gnu_symbol_any;
+ elf_tdata (info->output_bfd)->has_gnu_symbols |= elf_gnu_symbol_ifunc;
return TRUE;
}