[PATCH] pei386: make --enable-auto-import default

Charles Wilson cwilson@ece.gatech.edu
Thu May 30 13:43:00 GMT 2002


auto-import has been turned on by default in the cygwin build since 
November, with no ill effects.  This patch turns it on by default in 
general, but also changes the way auto-import-related 
warning/informational messages are issued, depending on whether 
auto-import is on by default, or is explicitly enabled (obviously there 
are no auto-import-related messages when auto-import is explicitly 
disabled...)

Since the tests in /bfd/ against pei386_auto_import are already against 
"zero/non-zero", then we can use the same -1 == default (implicitly 
enabled), 1 == explicitly enabled, 0 == explicitly disabled formuation 
that stdcall_fixup uses.

./bfd/cofflink.c:         if (!h && info->pei386_auto_import)
./bfd/linker.c:   if (info->pei386_auto_import)

When info->pei386_auto_import = -1 (default) then we continue to issue a 
message when auto-importing a variable.  If info->pei386_auto_import = 
1, then we suppress those informational messages -- the user obviously 
knows that she is auto-importing variables, since she explicitly 
--enabled them.

I downgraded the "Warning: resolving %s by linking to %s (auto-import)" 
  message to 'info_msg' on stdout, instead of 'einfo' on stderr.

--Chuck

2002-05-30  Charles Wilson  <cwilson@ece.gatech.edu>

	* ld/ldmain.c (main): initialize link_info.pei386_auto_import
	to -1 == implicit enable.
	* ld/emultempl/pe.em (gld_${EMULATION_NAME}_before_parse):
	initialize link_info.pei386_auto_import to -1 == implicit
	enable.
	(gld_${EMULATION_NAME}_parse_args): When processing
	--enable-auto-import and --disable-auto-import options, use
	'1' and '0' instead of 'true' and 'false'.
	(pe_find_data_imports): Only issue message about auto-import
	when the feature is implicitly enabled.  Downgrade message to
	informational instead of warning.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: binutils.patch
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20020530/d9cfdb58/attachment.ksh>


More information about the Cygwin-apps mailing list