[patch]: fastcall/stdcall and import libraries in ld

Kai Tietz ktietz70@googlemail.com
Fri Nov 13 10:10:00 GMT 2009


Hello,

This patch makes the described in documentation true, that stdcall
functions can be fixuped. It additional implements that fastcall
functions can be fixuped, too. Also it enables that functions from
import libraries, which have no decoration, can match to
fastcall/stdcall functions, when --enable-stdcall-fixup is specified
without warnings.

ChangLog for ld

2009-11-13  Kai Tietz  <kai.tietz@onevision.com>

	* pe-dll.c (pe_undef_alias_cdecl_match): New function.
	(pe_find_cdecl_alias_match): New function.
	(pe_process_import_defs): Add matching for import symbols
	declared as cdecl for fastcall/stdcall.
	* emultempl/pe.em (pe_undef_cdecl_match): Treat fastcall
	symbols, too.
	(pe_fixup_stdcalls): Likewise.
	(gld_XXX_after_open): Redo scanning for imported
	fastcall/stdcall symbols as cdecl one.
	* emultempl/pep.em (pep_undef_cdecl_match): Treat fastcall
	symbols, too.
	(pep_fixup_stdcalls): Likewise.
	(gld_XXX_after_open): Redo scanning for imported
	fastcall/stdcall symbols as cdecl one.

Tested for i686-pc-mingw32, x86_64-pc-mingw32, and i686-pc-cygwin. Ok for apply?

Cheers,
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: fastcall.diff
Type: application/octet-stream
Size: 5131 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20091113/aace16aa/attachment.obj>


More information about the Binutils mailing list