[gold patch obvious] incremental_test crashes gold on ARM

Cary Coutant ccoutant@google.com
Wed Sep 15 18:13:00 GMT 2010


> Hi Cary,  Attached is a test case for a problem that I ran into when
> testing gold for ARM.   The problem is reproducible on the x86 as
> well.  The symbol of "bar" for some reason does not have a symtab
> index when it is being output in Output_section_incremental_inputs<64,
> false>::write_info_blocks.

Thanks! I had forgotten to resolve forwarding symbols. I've committed
the following patch as obvious.

-cary


        * incremental.cc (Output_section_incremental_inputs::write_info_blocks):
        Resolve forwarding symbols.


Index: incremental.cc
===================================================================
RCS file: /cvs/src/src/gold/incremental.cc,v
retrieving revision 1.22
diff -u -p -r1.22 incremental.cc
--- incremental.cc	25 Aug 2010 08:36:54 -0000	1.22
+++ incremental.cc	15 Sep 2010 18:10:13 -0000
@@ -873,6 +873,8 @@ Output_section_incremental_inputs<size,
 	    for (unsigned int i = 0; i < nsyms; i++)
 	      {
 		const Symbol* sym = (*syms)[i];
+		if (sym->is_forwarder())
+		  sym = this->symtab_->resolve_forwards(sym);
 		unsigned int symtab_index = sym->symtab_index();
 		unsigned int chain = 0;
 		unsigned int first_reloc = 0;



More information about the Binutils mailing list