[patch ld]: Enable.pei386_auto_import for i?86-*-mingw* and x86_64-*-mingw* by default

Dave Korn dave.korn.cygwin@googlemail.com
Sat May 15 14:23:00 GMT 2010

On 15/05/2010 12:05, Kai Tietz wrote:

> by investigating this issue in more detail, I opened a cane of worms.

  You replied this to the wrong thread!  Anyway ...

> I prepared a patch to address this issue and tested it for x86_64 and
> i686 targets. I put the logic for initialization of
> pe(p)_leading_underscore into a function for not having multiple times
> code at many places.

  This is definitely nicer.  It's kinda awkward that we have to remember to
call is_underscoring for its side-effect of conditioning the global
pe_leading_underscore variable, but I see you put an abort in pe-dll.c to
protect us against it going wrong so I guess it's not so bad.

> * emultempl/pe.em (is_leading): New helper function.
> Replace internal use of pe(p)_leading_underscore by is_leading function.
> * emultemp/pep.em: Likewise.
> * pe-dll.c: Change default underscoring for x64 target.

  The patch is OK, but please adjust your changelog to the standard format
before checking it in: you have 'is_leading' instead of 'is_underscoring', the
leading tab and line wrapping needs adding, you need to make a separate entry
for each function where you "replaced internal use ... by is_leading
function", and the pe-dll.c changes likewise should have one named item per
line in brackets for each of the things you changed.

  Also, because I think I remember us being asked once before not to mix
functional patches and white-space tidyups in the same commit, I committed the
whitespace trimming to pe-dll.c for you.  Apologies in advance if that gives
you merge problems, but I thought it was probably for the best.


> PS: I noticed an regression on 4.6 about collect2. Everything works
> find in ld (I've debugged collect2 call of ld and checked
> output-files), but gcc frontend reports a failure in DLL compile. Did
> you noticed the same?

  No, but I haven't built 4.6 this week, I've been busy.  I'll do a build over
the weekend and let you know if I see any problems.  If it's a mingw-only
problem, I'd check if there have been any recent changes to the pex stuff in
libiberty first off.

More information about the Binutils mailing list