diff options
Diffstat (limited to 'bfd/elf32-sh.c')
-rw-r--r-- | bfd/elf32-sh.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 5ab56bcc141..28a2fcc5ad4 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -4938,8 +4938,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } else if (h->root.type == bfd_link_hash_undefweak) relocation = 0; - else if (! info->executable - && info->unresolved_syms_in_objects == RM_IGNORE + else if (info->unresolved_syms_in_objects == RM_IGNORE && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) relocation = 0; else @@ -4947,8 +4946,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (! info->callbacks->undefined_symbol (info, h->root.root.string, input_bfd, input_section, rel->r_offset, - ((info->shared && info->unresolved_syms_in_shared_libs == RM_GENERATE_ERROR) - || (!info->shared && info->unresolved_syms_in_objects == RM_GENERATE_ERROR) + (info->unresolved_syms_in_objects == RM_GENERATE_ERROR || ELF_ST_VISIBILITY (h->other)))) return FALSE; relocation = 0; |