{
h->def_dynamic = 0;
h->ref_dynamic = 1;
+ /* PR 12549: Note if the dynamic reference is weak. */
+ h->ref_dynamic_nonweak = (bind != STB_WEAK);
}
}
{
h->ref_dynamic = 1;
hi->ref_dynamic = 1;
+ /* PR 12549: Note if the dynamic reference is weak. */
+ hi->ref_dynamic_nonweak =
+ h->ref_dynamic_nonweak = (bind != STB_WEAK);
}
else
{
if (!add_needed
&& definition
&& ((dynsym
- && h->ref_regular)
- || (h->ref_dynamic
+ && h->ref_regular_nonweak)
+ || (h->ref_dynamic_nonweak
&& (elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0
&& !on_needed_list (elf_dt_name (abfd), htab->needed))))
{