Index: object.cc =================================================================== RCS file: /cvs/src/src/gold/object.cc,v retrieving revision 1.118 diff -u -p -r1.118 object.cc --- object.cc 15 Jan 2010 01:44:22 -0000 1.118 +++ object.cc 10 Feb 2010 19:26:16 -0000 @@ -1609,9 +1609,13 @@ Sized_relobj::do_count // - the symbol has a name. // // We do not discard a symbol if it needs a dynamic symbol entry. + // Also, if we are generating a relocatable output file, then + // some of the local symbols may be required by relocs; we output them + // below if they are needed. if (discard_locals && sym.get_st_type() != elfcpp::STT_FILE && !lv.needs_output_dynsym_entry() + && !lv.needs_output_symtab_entry() && parameters->target().is_local_label_name(name)) { lv.set_no_output_symtab_entry();