From ca5f22031a4ddd2e9e2365b4b77ab944ad425212 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Tue, 25 May 2010 10:00:25 +0000 Subject: [PATCH] 2010-05-25 Kai Tietz * emultempl/pe.em (default_merge_rdata): New shell variable. (MERGE_RDATA_V2): New macro. (gld_${EMULATION_NAME}_get_script): Adjust rule for auto-import selected script. --- ld/ChangeLog | 7 +++++++ ld/emultempl/pe.em | 12 +++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 5c1f94b7525..e5afd7539cd 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +2010-05-25 Kai Tietz + + * emultempl/pe.em (default_merge_rdata): New shell variable. + (MERGE_RDATA_V2): New macro. + (gld_${EMULATION_NAME}_get_script): Adjust rule for auto-import + selected script. + 2010-05-15 Kai Tietz * emultempl/pe.em (is_underscoring): New helper function. diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index ca82fa8221c..3185336c18b 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -172,9 +172,15 @@ EOF case ${target} in *-*-cygwin*) default_auto_import=1 + default_merge_rdata=1 + ;; + *-w64-mingw*) + default_auto_import=1 + default_merge_rdata=0 ;; *) default_auto_import=-1 + default_merge_rdata=1 ;; esac @@ -185,6 +191,10 @@ fragment <> 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 && (MERGE_RDATA_V2 || 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.30.2