This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Oops, serious ld bug cropped up
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, Tristan Gingold <gingold at adacore dot com>
- Date: Thu, 01 Oct 2009 19:57:46 +0100
- Subject: Re: Oops, serious ld bug cropped up
- References: <4AC4D4ED.8000506@gmail.com> <4AC4E7F3.3090003@gmail.com>
Dave Korn wrote:
> The auxiliary symbol data for an NT weak undef reference, that points to the
> default value for the symbol if it should not be found, is getting the wrong
> value in it somehow, and ends up carrying the index value of another weak
> undef - the linker then attempts to parse the wrong members out of the union
> in the symbol hash. There's either some serious memory trashing going on, or
> more likely something's adjusting the symbol table without renumbering the
> internal references.
Neither. The undef symbol exists in two object files. When relocating the
second, it looks up the symbol in the hash, finds the aux entry, looks up the
aux symbol index in that - but then assumes that the aux entry must be in the
same bfd's symtab, which isn't the case. Shouldn't be at all hard to fix.
cheers,
DaveK