+2013-03-27 Will Newton <will.newton@linaro.org>
+
+ * elf32-arm.c (elf32_arm_final_link_relocate): Avoid emitting a
+ dynamic reloc for non-default visibility undefined weaks.
+ (allocate_dynrelocs_for_symbol): Avoid allocating space for a
+ dynamic reloc for non-default visibility undefined weaks.
+
2013-03-26 Alan Modra <amodra@gmail.com>
* elflink.c (_bfd_elf_add_default_symbol): Preserve section
{
if (dynreloc_st_type == STT_GNU_IFUNC)
outrel.r_info = ELF32_R_INFO (0, R_ARM_IRELATIVE);
- else if (info->shared)
+ else if (info->shared &&
+ (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || h->root.type != bfd_link_hash_undefweak))
outrel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
else
outrel.r_info = 0;
they all resolve dynamically instead. Reserve room for the
GOT entry's R_ARM_IRELATIVE relocation. */
elf32_arm_allocate_irelocs (info, htab->root.srelgot, 1);
- else if (info->shared)
+ else if (info->shared && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || h->root.type != bfd_link_hash_undefweak))
/* Reserve room for the GOT entry's R_ARM_RELATIVE relocation. */
elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
}