diff options
author | Craig Silverstein <csilvers@google.com> | 2009-09-18 20:03:22 +0000 |
---|---|---|
committer | Craig Silverstein <csilvers@google.com> | 2009-09-18 20:03:22 +0000 |
commit | 8c60465154ed694fac2531f65e7ca1ae51093174 (patch) | |
tree | 5b1e1c166e0d5f50c40988974cf4a87e9dfcb216 /gold/symtab.cc | |
parent | f43030c448dc1938d6fc7a6072f1a76853b1b70d (diff) | |
download | gdb-8c60465154ed694fac2531f65e7ca1ae51093174.zip gdb-8c60465154ed694fac2531f65e7ca1ae51093174.tar.gz gdb-8c60465154ed694fac2531f65e7ca1ae51093174.tar.bz2 |
* object.cc (Sized_relobj::do_count): Test should_retain_symbol map.
* options.cc: Include <cerrno> and <fstream>.
(General_options::finalize): Parse -retain-symbols-file tag.
* options.h: New flag.
(General_options): New method should_retain_symbol, new
variable symbols_to_retain.
* symtab.cc (Symbol_table::sized_finalize_symbol): Test
should_retain_symbol map.
* testsuite/Makefile.am (retain_symbols_file_test): New test.
* testsuite/Makefile.in: Regenerate.
* testsuite/retain_symbols_file_test.sh: New file.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r-- | gold/symtab.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc index 292a262..d5f699b 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -2521,7 +2521,8 @@ Symbol_table::sized_finalize_symbol(Symbol* unsized_sym) sym->set_value(value); - if (parameters->options().strip_all()) + if (parameters->options().strip_all() + || !parameters->options().should_retain_symbol(sym->name())) { sym->set_symtab_index(-1U); return false; |