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]

{patch bfd/ld/binutils]: Adjust calling convention of x64 windows to non-leading underscore


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

Attachment: x86_64_bin_underscore.diff
Description: Binary data


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