return FALSE;
}
+ htab = elf_hash_table (info);
+
+ /* Support garbage collection against STT_GNU_IFUNC symbols. */
+ if (h->plt.refcount <= 0 && h->got.refcount <= 0)
+ {
+ h->got = htab->init_got_offset;
+ h->plt = htab->init_plt_offset;
+ *head = NULL;
+ return TRUE;
+ }
+
/* Return and discard space for dynamic relocations against it if
it is never referenced in a non-shared object. */
if (!h->ref_regular)
if (h->plt.refcount > 0
|| h->got.refcount > 0)
abort ();
- h->got.offset = (bfd_vma) -1;
+ h->got = htab->init_got_offset;
+ h->plt = htab->init_plt_offset;
*head = NULL;
return TRUE;
}
else
sizeof_reloc = bed->s->sizeof_rel;
- htab = elf_hash_table (info);
-
/* When building a static executable, use .iplt, .igot.plt and
.rel[a].iplt sections for STT_GNU_IFUNC symbols. */
if (htab->splt != NULL)