+2018-07-17 Maciej W. Rozycki <macro@mips.com>
+
+ * elf32-nds32.c (nds32_elf_relax_loadstore): Use
+ `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
+ whether the symbol is absolute.
+ (nds32_elf_relax_lo12): Likewise.
+ * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
+ (elfNN_aarch64_check_relocs): Likewise.
+ * xcofflink.c (xcoff_need_ldrel_p): Likewise.
+ (bfd_xcoff_import_symbol): Likewise.
+ (xcoff_write_global_symbol): Likewise.
+
2018-07-17 Maciej W. Rozycki <macro@mips.com>
* linker.c (bfd_is_abs_symbol): New macro.
/* This is avoid to relax symbol address which is fixed
relocations. Ex: _stack. */
- if (h && bfd_is_abs_section (h->root.u.def.section))
+ if (h && bfd_is_abs_symbol (&h->root))
return FALSE;
}
/* This is avoid to relax symbol address which is fixed
relocations. Ex: _stack. */
else if (N32_OP6 (insn) == N32_OP6_ORI
- && h && bfd_is_abs_section (h->root.u.def.section))
+ && h && bfd_is_abs_symbol (&h->root))
return;
else
{
weak_undef_p = (h ? h->root.type == bfd_link_hash_undefweak
: bfd_is_und_section (sym_sec));
- abs_symbol_p = (h !=NULL && h->root.type == bfd_link_hash_defined
- && bfd_is_abs_section (h->root.u.def.section));
+ abs_symbol_p = h != NULL && bfd_is_abs_symbol (&h->root);
/* Since STT_GNU_IFUNC symbol must go through PLT, we handle
if (h != NULL
/* This is an absolute symbol. It represents a value instead
of an address. */
- && ((h->root.type == bfd_link_hash_defined
- && bfd_is_abs_section (h->root.u.def.section))
+ && (bfd_is_abs_symbol (&h->root)
/* This is an undefined symbol. */
|| h->root.type == bfd_link_hash_undefined))
break;
case R_RLA:
/* Absolute relocations against absolute symbols can be
resolved statically. */
- if (h != NULL
- && (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- && bfd_is_abs_section (h->root.u.def.section))
+ if (h != NULL && bfd_is_abs_symbol (&h->root))
return FALSE;
return TRUE;
if (val != (bfd_vma) -1)
{
if (h->root.type == bfd_link_hash_defined
- && (! bfd_is_abs_section (h->root.u.def.section)
+ && (!bfd_is_abs_symbol (&h->root)
|| h->root.u.def.value != val))
(*info->callbacks->multiple_definition) (info, &h->root, output_bfd,
bfd_abs_section_ptr, val);
|| h->root.type == bfd_link_hash_defweak)
&& h->smclas == XMC_XO)
{
- BFD_ASSERT (bfd_is_abs_section (h->root.u.def.section));
+ BFD_ASSERT (bfd_is_abs_symbol (&h->root));
isym.n_value = h->root.u.def.value;
isym.n_scnum = N_UNDEF;
if (h->root.type == bfd_link_hash_undefweak