summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2011-05-11 00:29:56 +0000
committerCary Coutant <ccoutant@google.com>2011-05-11 00:29:56 +0000
commitfc7dfae6ce424a703bc09febd02cf8f47ed452d6 (patch)
treef2b5c9623333853742579185bd48dbb1b275f3ac
parent3fae20d1da5d89b6a1f3b7e9d3415f74ae902781 (diff)
downloadbinutils-redhat-fc7dfae6ce424a703bc09febd02cf8f47ed452d6.tar.gz
* object.cc (Sized_relobj::do_count_local_symbols): Check for
strip_all (-s).
-rw-r--r--gold/ChangeLog5
-rw-r--r--gold/object.cc4
2 files changed, 8 insertions, 1 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index f198b806cd..ec9abb33ed 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-10 Cary Coutant <ccoutant@google.com>
+
+ * object.cc (Sized_relobj::do_count_local_symbols): Check for
+ strip_all (-s).
+
2011-05-06 Ian Lance Taylor <iant@google.com>
* layout.cc (Layout::layout): If the output section flags change,
diff --git a/gold/object.cc b/gold/object.cc
index b1fc25cedc..a39a37c9a4 100644
--- a/gold/object.cc
+++ b/gold/object.cc
@@ -1824,6 +1824,7 @@ Sized_relobj<size, big_endian>::do_count_local_symbols(Stringpool* pool,
unsigned int dyncount = 0;
// Skip the first, dummy, symbol.
psyms += sym_size;
+ bool strip_all = parameters->options().strip_all();
bool discard_all = parameters->options().discard_all();
bool discard_locals = parameters->options().discard_locals();
for (unsigned int i = 1; i < loccount; ++i, psyms += sym_size)
@@ -1882,7 +1883,8 @@ Sized_relobj<size, big_endian>::do_count_local_symbols(Stringpool* pool,
++dyncount;
}
- if (discard_all && lv.may_be_discarded_from_output_symtab())
+ if (strip_all
+ || (discard_all && lv.may_be_discarded_from_output_symtab()))
{
lv.set_no_output_symtab_entry();
continue;