Mailing-List: contact cygwin-apps-help AT cygwin DOT com; run by ezmlm Sender: cygwin-apps-owner AT cygwin DOT com List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps AT cygwin DOT com Delivered-To: mailing list cygwin-apps AT cygwin DOT com Message-ID: <3CE9C6EF.5090905@ece.gatech.edu> Date: Tue, 21 May 2002 00:02:56 -0400 From: Charles Wilson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2 X-Accept-Language: en-us MIME-Version: 1.0 To: Danny Smith CC: cygwin-apps AT cygwin DOT com Subject: Re: binutils status? References: <20020520212232 DOT 36691 DOT qmail AT web14505 DOT mail DOT yahoo DOT com> Content-Type: multipart/mixed; boundary="------------040102060301060500080709" This is a multi-part message in MIME format. --------------040102060301060500080709 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Danny Smith wrote: >>> I think we should keep the warnings if --auto-import isn't specified >>> on the command line but get rid of them if it is explictly >>> specified. Including --auto-import on the command line would >>> indicate that the user knows what they're doing, so they don't >>> need to see warnings. >>> >> Works for me. >> >> > Agree This addresses my main concern of no warnings and is similar > to the way --enable-stdcall-fixup works now. How about this? Since the tests in /bfd/ are against pei386_auto_import != 0, effectively: ./bfd/cofflink.c: if (!h && info->pei386_auto_import) ./bfd/linker.c: if (info->pei386_auto_import) We can use the same -1 == default, 1 == explicitly enabled, 0 == explicitly disabled formuation that stdcall_fixup uses. I also downgraded the message to 'info_msg' on stdout, instead of 'einfo' on stderr (this may be overkill given the 0/1/-1 changes) Finally, I'm not sure if link_info.pei386_auto_import should be set to '0' or to '-1' in ldmain.c. It is *reset* to '-1' at the beginning of gld_${EMULATION_NAME}_before_parse() in pe.em...The question is, since pei386_auto_import is part of the global link_info structure, should a Solaris linker have that variable set to '0' or to '-1'? I don't think it makes any functional difference, but I'm unsure of the stylistic issues. --Chuck --------------040102060301060500080709 Content-Type: text/plain; name="binutils.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="binutils.patch" ? 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.46 diff -u -r1.46 ldmain.c --- ld/ldmain.c 10 May 2002 09:49:25 -0000 1.46 +++ ld/ldmain.c 21 May 2002 03:52:12 -0000 @@ -258,7 +258,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 */ 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.59 diff -u -r1.59 pe.em --- ld/emultempl/pe.em 15 Feb 2002 02:11:05 -0000 1.59 +++ ld/emultempl/pe.em 21 May 2002 03:52:18 -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 */ #if (PE_DEF_SUBSYSTEM == 9) || (PE_DEF_SUBSYSTEM == 2) #if defined TARGET_IS_mipspe || defined TARGET_IS_armpe @@ -622,10 +622,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; @@ -906,7 +906,10 @@ 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; --------------040102060301060500080709--