+2014-08-13 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
+
+ * elf32-or1k.c (or1k_elf_relocate_section, or1k_elf_check_relocs,
+ allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL
+ and SYMBOLIC_BIND.
+
2014-08-12 Alan Modra <amodra@gmail.com>
* coff-aux.c (coff_m68k_aux_link_add_one_symbol): Only call "notice"
dyn = htab->root.dynamic_sections_created;
if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
|| (info->shared
- && (info->symbolic
- || h->dynindx == -1
- || h->forced_local)
- && h->def_regular))
+ && SYMBOL_REFERENCES_LOCAL (info, h)))
{
/* This is actually a static link, or it is a
-Bsymbolic link and the symbol is defined
&& (h == NULL
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak)
- && (!howto->pc_relative
- || (h != NULL
- && h->dynindx != -1
- && (!info->symbolic
- || !h->def_regular))))
+ && (howto->type != R_OR1K_INSN_REL_26
+ || !SYMBOL_CALLS_LOCAL (info, h)))
|| (!info->shared
&& h != NULL
&& h->dynindx != -1
&& (sec->flags & SEC_ALLOC) != 0
&& (ELF32_R_TYPE (rel->r_info) != R_OR1K_INSN_REL_26
|| (h != NULL
- && (! info->symbolic
+ && (!SYMBOLIC_BIND (info, h)
|| h->root.type == bfd_link_hash_defweak
|| !h->def_regular))))
|| (!info->shared
the symbol was forced to be local because of a version file.
The entry in the global offset table will already have been
initialized in the relocate_section function. */
- if (info->shared
- && (info->symbolic
- || h->dynindx == -1
- || h->forced_local)
- && h->def_regular)
+ if (info->shared && SYMBOL_REFERENCES_LOCAL (info, h))
{
rela.r_info = ELF32_R_INFO (0, R_OR1K_RELATIVE);
rela.r_addend = (h->root.u.def.value
if (info->shared)
{
- if (h->def_regular
- && (h->forced_local
- || info->symbolic))
+ if (SYMBOL_CALLS_LOCAL (info, h))
{
struct elf_or1k_dyn_relocs **pp;