{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: Can't relax br at 0x%lx in section `%A'."
+ (_("%B: Can't relax br at %#Lx in section `%A'."
" Please use brl or indirect branch."),
- sec->owner, (unsigned long) roff, sec);
+ sec->owner, roff, sec);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
else
h = NULL;
+ if (h && UNDEFWEAK_NO_DYNAMIC_RELOC (info, h))
+ continue;
+
/* We can only get preliminary data on whether a symbol is
locally or externally defined, as not all of the input files
have yet been processed. Do something with what we know, as
/* PR15323, ref flags aren't set for references in the same
object. */
- h->root.non_ir_ref = 1;
+ h->root.non_ir_ref_regular = 1;
h->ref_regular = 1;
}
else
h = NULL;
+ if (h && UNDEFWEAK_NO_DYNAMIC_RELOC (info, h))
+ continue;
+
/* We can only get preliminary data on whether a symbol is
locally or externally defined, as not all of the input files
have yet been processed. Do something with what we know, as
if (!bfd_link_executable (x->info)
&& (!h
- || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ && !UNDEFWEAK_NO_DYNAMIC_RELOC (x->info, h))
|| (h->root.type != bfd_link_hash_undefweak
&& h->root.type != bfd_link_hash_undefined)))
{
shared = bfd_link_pic (x->info);
resolved_zero = (dyn_i->h
- && ELF_ST_VISIBILITY (dyn_i->h->other)
- && dyn_i->h->root.type == bfd_link_hash_undefweak);
+ && UNDEFWEAK_NO_DYNAMIC_RELOC (x->info,
+ dyn_i->h));
/* Take care of the GOT and PLT relocations. */
/* Install a dynamic relocation if needed. */
if (((bfd_link_pic (info)
&& (!dyn_i->h
- || ELF_ST_VISIBILITY (dyn_i->h->other) == STV_DEFAULT
+ || (ELF_ST_VISIBILITY (dyn_i->h->other) == STV_DEFAULT
+ && !UNDEFWEAK_NO_DYNAMIC_RELOC (info, dyn_i->h))
|| dyn_i->h->root.type != bfd_link_hash_undefweak)
&& dyn_r_type != R_IA64_DTPREL32LSB
&& dyn_r_type != R_IA64_DTPREL64LSB)
if (!is_plt
&& bfd_link_pic (info)
&& (!dyn_i->h
- || ELF_ST_VISIBILITY (dyn_i->h->other) == STV_DEFAULT
+ || (ELF_ST_VISIBILITY (dyn_i->h->other) == STV_DEFAULT
+ && !UNDEFWEAK_NO_DYNAMIC_RELOC (info, dyn_i->h))
|| dyn_i->h->root.type != bfd_link_hash_undefweak))
{
unsigned int dyn_r_type;
overflow:
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: short data segment overflowed (0x%lx >= 0x400000)"),
- bfd_get_filename (abfd),
- (unsigned long) (max_short_vma - min_short_vma));
+ (_("%B: short data segment overflowed (%#Lx >= 0x400000)"),
+ abfd, max_short_vma - min_short_vma);
return FALSE;
}
else if ((gp_val > min_short_vma
&& max_short_vma - gp_val >= 0x200000))
{
_bfd_error_handler
- (_("%s: __gp does not cover short data segment"),
- bfd_get_filename (abfd));
+ (_("%B: __gp does not cover short data segment"), abfd);
return FALSE;
}
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: unknown relocation type %d"),
- input_bfd, (int) r_type);
+ (_("%B: unknown relocation type %d"), input_bfd, (int) r_type);
bfd_set_error (bfd_error_bad_value);
ret_val = FALSE;
continue;
case R_IA64_DIR64LSB:
/* Install a dynamic relocation for this reloc. */
if ((dynamic_symbol_p || bfd_link_pic (info))
+ && !(h && UNDEFWEAK_NO_DYNAMIC_RELOC (info, h))
&& r_symndx != STN_UNDEF
&& (input_section->flags & SEC_ALLOC) != 0)
{
_bfd_error_handler
/* xgettext:c-format */
(_("%B: missing TLS section for relocation %s against `%s'"
- " at 0x%lx in section `%A'."),
+ " at %#Lx in section `%A'."),
input_bfd, howto->name, name,
rel->r_offset, input_section);
break;
that the section is too big to relax. */
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: Can't relax br (%s) to `%s' at 0x%lx"
- " in section `%A' with size 0x%lx (> 0x1000000)."),
+ (_("%B: Can't relax br (%s) to `%s' at %#Lx"
+ " in section `%A' with size %#Lx (> 0x1000000)."),
input_bfd, howto->name, name, rel->r_offset,
input_section, input_section->size);
break;