summaryrefslogtreecommitdiff
path: root/ld/emultempl/pe.em
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2009-11-06 15:50:56 +0000
committerKai Tietz <kai.tietz@onevision.com>2009-11-06 15:50:56 +0000
commite468a046931eb627c31071f9e520f7d1e8e7a3b5 (patch)
tree2461abb923c034980f1f25d5687e057209be51be /ld/emultempl/pe.em
parent5d329b7db9afec533616070131d7bde5fe4b71fa (diff)
downloadbinutils-gdb-e468a046931eb627c31071f9e520f7d1e8e7a3b5.tar.gz
2009-11-06 Kai Tietz <kai.tietz@onevision.com>
* pe.em (DEFAULT_PSEUDO_RELOC_VERSION): New macro. (gld_XXX_before_parse): Set pseudo-relocation default version to DEFAULT_PSEUDO_RELOC_VERSION. (gldXXX_handle_option): Likewise.
Diffstat (limited to 'ld/emultempl/pe.em')
-rw-r--r--ld/emultempl/pe.em12
1 files changed, 10 insertions, 2 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index f926502bb52..4326e7e8266 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -99,6 +99,12 @@ fragment <<EOF
#define DLL_SUPPORT
#endif
+#if defined(TARGET_IS_i386pe)
+#define DEFAULT_PSEUDO_RELOC_VERSION 2
+#else
+#define DEFAULT_PSEUDO_RELOC_VERSION 1
+#endif
+
#if defined(TARGET_IS_i386pe) || ! defined(DLL_SUPPORT)
#define PE_DEF_SUBSYSTEM 3
#else
@@ -161,7 +167,8 @@ esac
fragment <<EOF
link_info.pei386_auto_import = ${default_auto_import};
- link_info.pei386_runtime_pseudo_reloc = 1; /* Use by default version 1. */
+ /* Use by default version. */
+ link_info.pei386_runtime_pseudo_reloc = DEFAULT_PSEUDO_RELOC_VERSION;
#endif
}
@@ -746,7 +753,8 @@ gld${EMULATION_NAME}_handle_option (int optc)
link_info.pei386_auto_import = 0;
break;
case OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC:
- link_info.pei386_runtime_pseudo_reloc = 1;
+ link_info.pei386_runtime_pseudo_reloc =
+ DEFAULT_PSEUDO_RELOC_VERSION;
break;
case OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V1:
link_info.pei386_runtime_pseudo_reloc = 1;