summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2000-05-22 07:26:58 +0000
committerH.J. Lu <hjl@lucon.org>2000-05-22 07:26:58 +0000
commitd9d44fe4c56f9fbb4e2db06384fc6ec08aa4bfd9 (patch)
tree3f6d5ffd37fd30db5c259878e7c9cc0e4922cb94 /bfd
parent112de7e0a0cd8a4dd491cbbe3d8706ae82f9086b (diff)
downloadgdb-d9d44fe4c56f9fbb4e2db06384fc6ec08aa4bfd9.tar.gz
2000-05-22 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_output_extsym): Clear the visibility field for symbols not defined locally.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elflink.h5
2 files changed, 10 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6a1d03bd1a8..87e24bb7df1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-22 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_link_output_extsym): Clear the visibility
+ field for symbols not defined locally.
+
2000-05-18 Alan Modra <alan@linuxcare.com.au>
* libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 5d86bbc5338..f1dab7059f2 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. */