[PATCH,committed] Fix NT weak undef aux symbol lookup [was Re: Oops, serious ld bug cropped up]

Dave Korn dave.korn.cygwin@googlemail.com
Thu Oct 1 19:48:00 GMT 2009


Dave Korn wrote:

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

  Trivial, in fact; a 6-character fix! :-)  We just use the auxbfd field,
because that is what it is for.

2009-10-01  Dave Korn  <dave.korn.cygwin@gmail.com>

	* cofflink.c (_bfd_coff_generic_relocate_section): Look for the aux
	symbol for a weak undef in the auxbfd, not the input bfd.

  Built and regtested on i686-pc-cygwin, and verified that it resolves the
reported problem compiling gettext.

  Committed to HEAD.  Tristan, I'm sure it's a formality, but, OK for 2.20?

    cheers,
      DaveK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nt-weak-multiple-undefs-fix.diff
Type: text/x-c
Size: 663 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20091001/c1135a2f/attachment.bin>


More information about the Binutils mailing list