From dc9bd8c92af67947db44b3cb428c050259b15cd0 Mon Sep 17 00:00:00 2001 From: Hannes Domani Date: Fri, 3 Jan 2020 12:55:12 +0000 Subject: For PE format files, the base relocation table is necessary if the image is loaded at a different image base than specified in the PE header. This patch provides a new option --enable-reloc-section to force the generation of this section. * emultempl/pe.em: Add new option --enable-reloc-section. * emultempl/pep.em: Likewise. * ld.texi: Document --enable-reloc-section. * pe-dll.c (pe_dll_build_sections): Use pe_dll_enable_reloc_section. (pe_dll_fill_sections): Simplify by calling pe_exe_fill_sections. * pe-dll.h: Add extern declaration of option flag. * pep-dll.c (pe_dll_enable_reloc_section): Add alias define for pep_dll_enable_reloc_section. * pep-dll.h: Add extern declaration of option flag. --- ld/pep-dll.h | 1 + 1 file changed, 1 insertion(+) (limited to 'ld/pep-dll.h') diff --git a/ld/pep-dll.h b/ld/pep-dll.h index 0b66767..d05598f 100644 --- a/ld/pep-dll.h +++ b/ld/pep-dll.h @@ -39,6 +39,7 @@ extern int pep_dll_extra_pe_debug; extern int pep_use_nul_prefixed_import_tables; extern int pep_use_coff_long_section_names; extern int pep_leading_underscore; +extern int pep_dll_enable_reloc_section; typedef enum { EXCLUDESYMS, EXCLUDELIBS, EXCLUDEFORIMPLIB } exclude_type; -- cgit v1.1