X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=ld%2Femultempl%2Fpe.em;h=37146ab59f843f9e248f9232f3812e269233a16c;hb=c553bb910d30224f6d5e1e10a67a839093e97fa0;hp=4701f6d0f833cad44b4f6c801a5644388216ef89;hpb=ee3cc2e2eef036f2175d91ccba93d523d5418e23;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index 4701f6d0f8..37146ab59f 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -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; @@ -758,8 +758,8 @@ gld_${EMULATION_NAME}_after_parse () opened, so registering the symbol as undefined will make a difference. */ - if (! link_info.relocateable && entry_symbol != NULL) - ldlang_add_undef (entry_symbol); + if (! link_info.relocateable && entry_symbol.name != NULL) + ldlang_add_undef (entry_symbol.name); } /* pe-dll.c directly accesses pe_data_import_dll, @@ -912,8 +912,9 @@ 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"), - undef->root.string, buf); + 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; asymbol **symbols; @@ -1417,10 +1418,10 @@ gld_${EMULATION_NAME}_finish () sprintf_vma (buffer + 2, val); - if (entry_symbol != NULL && entry_from_cmdline) + if (entry_symbol.name != NULL && entry_from_cmdline) einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"), - thumb_entry_symbol, entry_symbol); - entry_symbol = buffer; + thumb_entry_symbol, entry_symbol.name); + entry_symbol.name = buffer; } else einfo (_("%P: warning: connot find thumb start symbol %s\n"), thumb_entry_symbol); @@ -1667,7 +1668,7 @@ gld_${EMULATION_NAME}_place_orphan (file, s) stat_ptr = old; - if (place != NULL) + if (place != NULL && os->bfd_section != NULL) { asection *snew, **pps;