This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[gold patch obvious] incremental_test crashes gold on ARM
- From: Cary Coutant <ccoutant at google dot com>
- To: binutils <binutils at sourceware dot org>, Doug Kwan (éæå) <dougkwan at google dot com>
- Date: Wed, 15 Sep 2010 11:13:09 -0700
- Subject: [gold patch obvious] incremental_test crashes gold on ARM
> 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;