diff options
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r-- | bfd/elflink.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h index 5d86bbc..f1dab705 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -5089,6 +5089,11 @@ elf_link_output_extsym (h, data) sym.st_info = ELF_ST_INFO (bindtype, ELF_ST_TYPE (sym.st_info)); } + /* If a symbol is not defined locally, we clear the visibility + field. */ + if ((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 there now. We have already know the symbol index. We also fill in the entry in the .hash section. */ |