diff options
author | Kai Tietz <kai.tietz@onevision.com> | 2008-11-14 15:13:05 +0000 |
---|---|---|
committer | Kai Tietz <kai.tietz@onevision.com> | 2008-11-14 15:13:05 +0000 |
commit | 6cb442d374a04461bbdd63ef85ce370c51a06e4f (patch) | |
tree | 3bfb061998c23b94bbd0cd623ce9df965ee5c3b9 /ld/emultempl/pe.em | |
parent | 7582fb4a6a18a5def099aa8795f7ebbac8c06255 (diff) | |
download | gdb-6cb442d374a04461bbdd63ef85ce370c51a06e4f.zip gdb-6cb442d374a04461bbdd63ef85ce370c51a06e4f.tar.gz gdb-6cb442d374a04461bbdd63ef85ce370c51a06e4f.tar.bz2 |
2008-11-14 Kai Tietz <kai.tietz@onevision.com>
* emultempl/pep.em (..._before_parse): initialize
pei386_runtime_pseudo_reloc by version 2.
(OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V1): New option.
(OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2): New option.
(make_import_fixup): Use relocation size to read addend.
* emultempl/pe.em (..._before_parse): initialize
pei386_runtime_pseudo_reloc by version 1.
(OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V1): New option.
(OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2): New option.
* pe-dll.c (pe-dll.h): Remove useless include.
(make_runtime_pseudo_reloc): Change addend to use bfd_vma.
Handle the two variants of pseudo-relocation.
(pe_create_import_fixup): Change addend to type bfd_vma.
Modify for the two pseudo_relocation variants.
(runtime_pseudp_reloc_v2_init): New static variable.
* pe-dll.h (pe_create_import_fixup): Change addend argument type
to bfd_vma.
* pep-dll.h (pep_create_import_fixup): Likewise.
* NEWS: Add comment.
Diffstat (limited to 'ld/emultempl/pe.em')
-rw-r--r-- | ld/emultempl/pe.em | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index b963d03..43c0be3 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -146,7 +146,7 @@ gld_${EMULATION_NAME}_before_parse (void) config.dynamic_link = TRUE; config.has_shared = 1; link_info.pei386_auto_import = -1; - link_info.pei386_runtime_pseudo_reloc = -1; + link_info.pei386_runtime_pseudo_reloc = 1; /* Use by default version 1. */ #if (PE_DEF_SUBSYSTEM == 9) || (PE_DEF_SUBSYSTEM == 2) #if defined TARGET_IS_mipspe || defined TARGET_IS_armpe || defined TARGET_IS_arm_wince_pe @@ -203,6 +203,10 @@ gld_${EMULATION_NAME}_before_parse (void) (OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC + 1) #define OPTION_LARGE_ADDRESS_AWARE \ (OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC + 1) +#define OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V1 \ + (OPTION_LARGE_ADDRESS_AWARE + 1) +#define OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2 \ + (OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V1 + 1) static void gld${EMULATION_NAME}_add_options @@ -255,6 +259,8 @@ gld${EMULATION_NAME}_add_options {"enable-extra-pe-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 {"large-address-aware", no_argument, NULL, OPTION_LARGE_ADDRESS_AWARE}, {NULL, no_argument, NULL, 0} @@ -639,6 +645,12 @@ gld${EMULATION_NAME}_handle_option (int optc) case OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC: link_info.pei386_runtime_pseudo_reloc = 1; 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; case OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC: link_info.pei386_runtime_pseudo_reloc = 0; break; |