From 6ec6c79c28377f76932384d54ec6db56de8a8d51 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Tue, 25 May 2010 10:03:01 +0000 Subject: [PATCH] 2010-05-25 Kai Tietz * emultempl/pep.em (gld_${EMULATION_NAME}_before_parse): Enable by default auto_import. (gld${EMULATION_NAME}_handle_option): Warn about v1. (pep_find_data_imports): Remove superflous warnings about auto-import. (gld_${EMULATION_NAME}_get_script): Don't merge for auto-import and active pseudo-relocation-v2 rdata into data section. --- ld/ChangeLog | 7 +++++++ ld/emultempl/pep.em | 25 ++----------------------- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index e5afd75..51248e7 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,12 @@ 2010-05-25 Kai Tietz + * emultempl/pep.em (gld_${EMULATION_NAME}_before_parse): Enable by + default auto_import. + (gld${EMULATION_NAME}_handle_option): Warn about v1. + (pep_find_data_imports): Remove superflous warnings about + auto-import. + (gld_${EMULATION_NAME}_get_script): Don't merge for auto-import + and active pseudo-relocation-v2 rdata into data section. * emultempl/pe.em (default_merge_rdata): New shell variable. (MERGE_RDATA_V2): New macro. (gld_${EMULATION_NAME}_get_script): Adjust rule for auto-import diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em index 1312978..6594a46c 100644 --- a/ld/emultempl/pep.em +++ b/ld/emultempl/pep.em @@ -139,7 +139,7 @@ gld_${EMULATION_NAME}_before_parse (void) #ifdef DLL_SUPPORT config.dynamic_link = TRUE; config.has_shared = 1; - link_info.pei386_auto_import = -1; + link_info.pei386_auto_import = 1; link_info.pei386_runtime_pseudo_reloc = 2; /* Use by default version 2. */ #endif } @@ -185,7 +185,6 @@ enum options OPTION_EXCLUDE_LIBS, OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC, OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC, - OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V1, OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2, OPTION_EXCLUDE_MODULES_FOR_IMPLIB, OPTION_USE_NUL_PREFIXED_IMPORT_TABLES, @@ -263,7 +262,6 @@ gld${EMULATION_NAME}_add_options {"enable-extra-pep-debug", no_argument, NULL, OPTION_ENABLE_EXTRA_PE_DEBUG}, {"enable-runtime-pseudo-reloc", no_argument, NULL, OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC}, {"disable-runtime-pseudo-reloc", no_argument, NULL, OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC}, - {"enable-runtime-pseudo-reloc-v1", no_argument, NULL, OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V1}, {"enable-runtime-pseudo-reloc-v2", no_argument, NULL, OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2}, #endif {"enable-long-section-names", no_argument, NULL, OPTION_ENABLE_LONG_SECTION_NAMES}, @@ -736,9 +734,6 @@ gld${EMULATION_NAME}_handle_option (int optc) case OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC: link_info.pei386_runtime_pseudo_reloc = 0; break; - case OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V1: - link_info.pei386_runtime_pseudo_reloc = 1; - break; case OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2: link_info.pei386_runtime_pseudo_reloc = 2; break; @@ -1097,22 +1092,6 @@ pep_find_data_imports (void) asymbol **symbols; int nsyms, i; - if (link_info.pei386_auto_import == -1) - { - static bfd_boolean warned = FALSE; - - info_msg (_("Info: resolving %s by linking to %s (auto-import)\n"), - undef->root.string, buf); - - /* PR linker/4844. */ - if (! warned) - { - warned = TRUE; - einfo (_("%P: warning: auto-importing has been activated without --enable-auto-import specified on the command line.\n\ -This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.\n")); - } - } - if (!bfd_generic_link_read_symbols (b)) { einfo (_("%B%F: could not read symbols: %E\n"), b); @@ -1928,7 +1907,7 @@ sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c if test -n "$GENERATE_AUTO_IMPORT_SCRIPT" ; then -echo ' ; else if (link_info.pei386_auto_import == 1) return' >> e${EMULATION_NAME}.c +echo ' ; else if (link_info.pei386_auto_import == 1 && link_info.pei386_runtime_pseudo_reloc != 2) return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.xa >> e${EMULATION_NAME}.c fi echo ' ; else return' >> e${EMULATION_NAME}.c -- 2.7.4