Enable pei386_auto_import by default. Only print a info message about auto

imports being resilved if this feature was not requested via a command line
switch.
This commit is contained in:
Nick Clifton 2002-06-07 14:56:01 +00:00
parent 6ab6b380ee
commit e0076ab314
5 changed files with 44 additions and 21 deletions

View File

@ -1,3 +1,9 @@
2002-06-07 Charles Wilson <cwilson@ece.gatech.edu>
* bfdlink.h (struct bfd_link_info): Change type of
pei386_auto_import field to int so that -1 can mean enabled by
default and 1 can mean enabled by command line switch.
2002-06-06 DJ Delorie <dj@redhat.com>
* hashtab.h (htab): Rearrange new members for backward

View File

@ -288,9 +288,10 @@ struct bfd_link_info
/* May be used to set DT_FLAGS_1 for ELF. */
bfd_vma flags_1;
/* True if auto-import thunks for DATA items in pei386 DLLs
should be generated/linked against. */
boolean pei386_auto_import;
/* Non-zero if auto-import thunks for DATA items in pei386 DLLs
should be generated/linked against. Set to 1 if this feature
is explicitly requested by the user, -1 if enabled by default. */
int pei386_auto_import;
/* True if non-PLT relocs should be merged into one reloc section
and sorted so that relocs against the same symbol come together. */

View File

@ -1,3 +1,17 @@
2002-06-07 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.
2002-06-07 Alan Modra <amodra@bigpond.net.au>
* scripttempl/elf.sc (.tbss): Fix mismatched parentheses/braces.
@ -7,7 +21,7 @@
* configure.host (hppa*64*-*-hpux11*): Define NATIVE_LIB_DIRS,
HOSTING_CRT0 and HOSTING_LIBS.
Wed Jun 5 20:42:31 2002 J"orn Rennecke <joern.rennecke@superh.com>
2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
* configure.tgt (shle*-*-elf*, sh64le-*-elf*): New configurations.

View File

@ -173,7 +173,7 @@ gld_${EMULATION_NAME}_before_parse()
#ifdef DLL_SUPPORT
config.dynamic_link = true;
config.has_shared = 1;
/* link_info.pei386_auto_import = true; */
link_info.pei386_auto_import = -1;
#if (PE_DEF_SUBSYSTEM == 9) || (PE_DEF_SUBSYSTEM == 2)
#if defined TARGET_IS_mipspe || defined TARGET_IS_armpe
@ -628,10 +628,10 @@ gld_${EMULATION_NAME}_parse_args(argc, argv)
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 @@ pe_find_data_imports ()
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;

View File

@ -260,6 +260,7 @@ main (argc, argv)
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;
link_info.combreloc = true;
link_info.spare_dynamic_tags = 5;