[patch ld]: Enable.pei386_auto_import for i?86-*-mingw* and x86_64-*-mingw* by default
Kai Tietz
ktietz70@googlemail.com
Sat May 15 11:05:00 GMT 2010
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: def_autoimp.diff
Type: application/octet-stream
Size: 10972 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100515/a5eee880/attachment.obj>
More information about the Binutils
mailing list