{patch bfd/ld/binutils]: Adjust calling convention of x64 windows to non-leading underscore
Kai Tietz
ktietz70@googlemail.com
Fri Apr 23 09:14:00 GMT 2010
Hello,
This patch changes default for x64 windows targets to use
non-underscored cdecl-symbols as described
in vendor's calling-convention. This patch is the binutils part and a
gcc patch will be posted soon for it, too.
To allow the *old* behavior too, a bfd configure option
'--enable-leading-mingw64-underscores' is added here.
Additional this patch makes sure that bfd gets queried for target's
underscoring default and not dependent on additional
configuration.
Also this patch cleans up by the internal symbol-prefixes "__nm_",
"__imp_", and "___imp_", which don't need to be underscore dependent
as prefix itself.
ChangeLog
bfd/
2010-04-23 Kai Tietz <kai.tietz@onevision.com>
* pe-x86_64.c (TARGET_UNDERSCORE): Set value dependent
to USE_MINGW64_LEADING_UNDERSCORES.
* pei-x86_64.c (TARGET_UNDERSCORE): Likewise.
* config.bfd: Change underscoring default for x64 mingw
to false.
* coffcode.h (coff_write_relocs): Add check that dereferenced
sym_ptr_ptr isn't NULL.
* config.in (USE_MINGW64_LEADING_UNDERSCORES): New.
* configure: Regenerated.
* configure.in: Add option '--enable-leading-mingw64-underscores'
and define config.in variable USE_MINGW64_LEADING_UNDERSCORES.
binutils/
2010-04-23 Kai Tietz <kai.tietz@onevision.com>
* dlltool.c (main): Query for bfd's underscoring default for
default target case.
ld/
2010-04-23 Kai Tietz <kai.tietz@onevision.com>
* pe-dll.c (_nm_-symbols): Use always underscored variant
for symbols.
(__imp_-symbols): Likewise.
(___imp_-symbols): Likewise.
Tested for i686-pc-cygwin, x86_64-pc-mingw32, and i686-pc-mingw32. Ok for apply?
Regards,
Kai
--
| (\_/) 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: x86_64_bin_underscore.diff
Type: application/octet-stream
Size: 11159 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100423/5534095e/attachment.obj>
More information about the Binutils
mailing list