This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


2010/5/15 Dave Korn <dave.korn.cygwin@googlemail.com>:
> On 14/05/2010 17:15, Kai Tietz wrote:
>
>> ? ? ? ? * emultempl/pe.em (default_auto_import): Set for i?86-*-mingw* to true.
>> ? ? ? ? * emultempl/pep.em (link_info.pei386_auto_import): Set to true.
>>
>> Tested for x86 and x64 mingw targets. Ok for apply?
>
> ?Well, the second one (pep.em) is OK, but have you discussed this change to
> the default for 32-bit with upstream MinGW.org people? ?Perhaps you should
> only match the w64 version?
>
> ? ?cheers,
> ? ? ?DaveK
>
>

Hi Dave,

by investigating this issue in more detail, I opened a cane of worms.
The issue is buried in the emulation-script execution in pe(p).em, so
I have to rethink patch here for w64 and pc. (the .secrel32 test of ld
fails by the auto-import == 1 patch).

The issue I've found is that current code assumed wrongly that
'bfd_get_target_info' returns for the underscore a true/false. This
isn't true, it returns the underscoring-character itself.

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.

ChangeLog

2010-05-15  Kai Tietz

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

Regards.
Kai

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?

-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

Attachment: def_autoimp.diff
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]