aboutsummaryrefslogtreecommitdiff
path: root/gold/symtab.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-02-01 00:42:24 +0000
committerIan Lance Taylor <iant@google.com>2008-02-01 00:42:24 +0000
commit65778909ad551d8f850a99095ac6a6369ead1c3e (patch)
treec23090cd31eb7aa543b84c7bccfce62f225832c2 /gold/symtab.cc
parent03e8f2b225dde93f13d6b7dd164f54ffe5591e64 (diff)
downloadgdb-65778909ad551d8f850a99095ac6a6369ead1c3e.zip
gdb-65778909ad551d8f850a99095ac6a6369ead1c3e.tar.gz
gdb-65778909ad551d8f850a99095ac6a6369ead1c3e.tar.bz2
From Cary Coutant: Ignore hidden symbols in a dynamic object.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r--gold/symtab.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc
index c26cc22..78bfec5 100644
--- a/gold/symtab.cc
+++ b/gold/symtab.cc
@@ -749,8 +749,11 @@ Symbol_table::add_from_dynobj(
{
elfcpp::Sym<size, big_endian> sym(p);
- // Ignore symbols with local binding.
- if (sym.get_st_bind() == elfcpp::STB_LOCAL)
+ // Ignore symbols with local binding or that have
+ // internal or hidden visibility.
+ if (sym.get_st_bind() == elfcpp::STB_LOCAL
+ || sym.get_st_visibility() == elfcpp::STV_INTERNAL
+ || sym.get_st_visibility() == elfcpp::STV_HIDDEN)
continue;
unsigned int st_name = sym.get_st_name();