aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index fd251b0..4c7f0bb 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -5696,7 +5696,8 @@ elf_link_output_extsym (h, data)
/* If a symbol is not defined locally, we clear the visibility
field. */
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ if (! finfo->info->relocateable
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
sym.st_other ^= ELF_ST_VISIBILITY (sym.st_other);
/* If this symbol should be put in the .dynsym section, then put it