+2009-01-15 Ian Lance Taylor <iant@google.com>
+
+ * object.cc (Sized_relobj::write_local_symbols): Don't write out
+ local symbols when stripping all symbols.
+
2009-01-14 Cary Coutant <ccoutant@google.com>
- * output.cc (Output_reloc): Add explicit instantiations.
+ * output.cc (Output_reloc): Add explicit instantiations.
2009-01-14 Cary Coutant <ccoutant@google.com>
Output_symtab_xindex* symtab_xindex,
Output_symtab_xindex* dynsym_xindex)
{
- if (parameters->options().strip_all()
- && this->output_local_dynsym_count_ == 0)
- return;
+ const bool strip_all = parameters->options().strip_all();
+ if (strip_all)
+ {
+ if (this->output_local_dynsym_count_ == 0)
+ return;
+ this->output_local_symbol_count_ = 0;
+ }
gold_assert(this->symtab_shndx_ != -1U);
if (this->symtab_shndx_ == 0)
st_shndx = out_sections[st_shndx]->out_shndx();
if (st_shndx >= elfcpp::SHN_LORESERVE)
{
- if (lv.needs_output_symtab_entry())
+ if (lv.needs_output_symtab_entry() && !strip_all)
symtab_xindex->add(lv.output_symtab_index(), st_shndx);
if (lv.needs_output_dynsym_entry())
dynsym_xindex->add(lv.output_dynsym_index(), st_shndx);
}
// Write the symbol to the output symbol table.
- if (!parameters->options().strip_all()
- && lv.needs_output_symtab_entry())
+ if (!strip_all && lv.needs_output_symtab_entry())
{
elfcpp::Sym_write<size, big_endian> osym(ov);