aboutsummaryrefslogtreecommitdiff
path: root/gold/symtab.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-10-10 19:02:56 +0000
committerIan Lance Taylor <iant@google.com>2007-10-10 19:02:56 +0000
commit9e2dcb779c27737af88468b29aa1d2a15b0b770f (patch)
tree70f6ac5955fb7855d0773850f9763675f0c4a0d4 /gold/symtab.cc
parent7500260a55897928017d06874240074c282dbb4a (diff)
downloadgdb-9e2dcb779c27737af88468b29aa1d2a15b0b770f.zip
gdb-9e2dcb779c27737af88468b29aa1d2a15b0b770f.tar.gz
gdb-9e2dcb779c27737af88468b29aa1d2a15b0b770f.tar.bz2
Implement -s and -S options which strip symbols.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r--gold/symtab.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc
index c9ac1c9..5237b8c 100644
--- a/gold/symtab.cc
+++ b/gold/symtab.cc
@@ -1316,10 +1316,16 @@ Symbol_table::sized_finalize(unsigned index, off_t off, Stringpool* pool)
}
sym->set_value(value);
- sym->set_symtab_index(index);
- pool->add(sym->name(), NULL);
- ++index;
- off += sym_size;
+
+ if (parameters->strip_all())
+ sym->set_symtab_index(-1U);
+ else
+ {
+ sym->set_symtab_index(index);
+ pool->add(sym->name(), NULL);
+ ++index;
+ off += sym_size;
+ }
}
this->output_count_ = index - orig_index;