public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [gold patch obvious] incremental_test crashes gold on ARM
@ 2010-09-15 18:13 Cary Coutant
  0 siblings, 0 replies; only message in thread
From: Cary Coutant @ 2010-09-15 18:13 UTC (permalink / raw)
  To: binutils, Doug Kwan (關振德)

> 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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-15 18:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-15 18:13 [gold patch obvious] incremental_test crashes gold on ARM Cary Coutant

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).