This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] pei386: make --enable-auto-import default
Okay, here's an updated version that (hopefully) addresses Nick's
concerns. (I still need that /gd/gnuorg/request-assign.changes file to
get the assignment paperwork started)
2002-06-01 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.
--Chuck
? .build
? .inst
? .sinst
? CYGWIN-PATCHES
? bfd/doc/bfdint.info
? bfd/doc/bfdint.info-1
? bfd/doc/bfdint.info-2
? bfd/doc/bfdsumm.info
? ld/ldint.info
Index: ld/ldmain.c
===================================================================
RCS file: /cvs/src/src/ld/ldmain.c,v
retrieving revision 1.47
diff -u -u -r1.47 ldmain.c
--- ld/ldmain.c 22 May 2002 05:08:30 -0000 1.47
+++ ld/ldmain.c 1 Jun 2002 04:37:59 -0000
@@ -259,7 +259,7 @@
link_info.eh_frame_hdr = false;
link_info.flags = (bfd_vma) 0;
link_info.flags_1 = (bfd_vma) 0;
- link_info.pei386_auto_import = false;
+ link_info.pei386_auto_import = -1; /* 0=disable 1=enable -1=default(enable) */
link_info.combreloc = true;
link_info.spare_dynamic_tags = 5;
Index: ld/emultempl/pe.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/pe.em,v
retrieving revision 1.63
diff -u -u -r1.63 pe.em
--- ld/emultempl/pe.em 27 May 2002 08:22:08 -0000 1.63
+++ ld/emultempl/pe.em 1 Jun 2002 04:38:00 -0000
@@ -173,7 +173,7 @@
#ifdef DLL_SUPPORT
config.dynamic_link = true;
config.has_shared = 1;
-/* link_info.pei386_auto_import = true; */
+ link_info.pei386_auto_import = -1; /* 1=enable 0=disable -1=default(enable) */
#if (PE_DEF_SUBSYSTEM == 9) || (PE_DEF_SUBSYSTEM == 2)
#if defined TARGET_IS_mipspe || defined TARGET_IS_armpe
@@ -628,10 +628,10 @@
pe_dll_do_default_excludes = 0;
break;
case OPTION_DLL_ENABLE_AUTO_IMPORT:
- link_info.pei386_auto_import = true;
+ link_info.pei386_auto_import = 1;
break;
case OPTION_DLL_DISABLE_AUTO_IMPORT:
- link_info.pei386_auto_import = false;
+ link_info.pei386_auto_import = 0;
break;
case OPTION_ENABLE_EXTRA_PE_DEBUG:
pe_dll_extra_pe_debug = 1;
@@ -912,7 +912,8 @@
sym = bfd_link_hash_lookup (link_info.hash, buf, 0, 0, 1);
if (sym && sym->type == bfd_link_hash_defined)
{
- einfo (_("Warning: resolving %s by linking to %s (auto-import)\n"),
+ if (link_info.pei386_auto_import == -1)
+ info_msg (_("Info: resolving %s by linking to %s (auto-import)\n"),
undef->root.string, buf);
{
bfd *b = sym->u.def.section->owner;