From 5063daf7357ccdc2c9e899ca0421c2e8e580c88d Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 27 Feb 2014 14:09:29 +0000 Subject: This patch adds a default manifest in to the final links performed by the Cygwin and MinGW targets. The manifest is necessary in order for the linked binaries to be executed in a Windows 8 environment. The manifest is added using a linker script so that this feature will be compiler-neutral. The resource merging code in the linker means that if an application provides its own manifest then the default manifest will be ignored. * configure.in (all_emul_extra_binaries): New variable. Populated by invoking configure.tgt. (EMUL_EXTRA_BINARIES): New substitution. * configure: Regenerate. * configure.tgt (target_extra_binaries): New variable. Set to default-manifest.o for Cygwin and MinGW targets. * Makefile.am (EMUL_EXTRA_BINARIES): New variable. Initialised by the configure script. (ALL_EMUL_EXTRA_BINARIES): New variable. (default-manifest.o): New rule to build the default manifest. (ld_new_DEPENDENCIES): Add EMUL_EXTRA_BINARIES. (install-data-local): Add EMUL_EXTRA_BINARIES. * Makefile.in: Regenerate. * ld.texinfo: Document default manifest support. * emulparams/i386pe.sh (DEFAULT_MANIFEST): Define. * emulparams/i386pep.sh (DEFAULT_MANIFEST): Define. * emultempl/default-manifest.rc: New file. * scripttempl/pe.sc (R_RSRC): Include DEFAULT_MANIFEST, if defined. * scripttempl/pep.sc (R_RSRC): Likewise. * ld-pe/longsecn-1.d: Allow for extra sections. * ld-pe/longsecn-2.d: Likewise. * ld-pe/longsecn.d: Likewise. * ld-pe/secrel.d: Likewise. --- ld/emulparams/i386pe.sh | 1 + ld/emulparams/i386pep.sh | 1 + 2 files changed, 2 insertions(+) (limited to 'ld/emulparams') diff --git a/ld/emulparams/i386pe.sh b/ld/emulparams/i386pe.sh index 38191ec..6e3c790 100644 --- a/ld/emulparams/i386pe.sh +++ b/ld/emulparams/i386pe.sh @@ -7,3 +7,4 @@ SUBSYSTEM=PE_DEF_SUBSYSTEM INITIAL_SYMBOL_CHAR=\"_\" TARGET_PAGE_SIZE=0x1000 GENERATE_AUTO_IMPORT_SCRIPT=1 +DEFAULT_MANIFEST="default-manifest.o" diff --git a/ld/emulparams/i386pep.sh b/ld/emulparams/i386pep.sh index 76a9802..c84ce44 100644 --- a/ld/emulparams/i386pep.sh +++ b/ld/emulparams/i386pep.sh @@ -7,3 +7,4 @@ SUBSYSTEM=PE_DEF_SUBSYSTEM INITIAL_SYMBOL_CHAR=\"_\" TARGET_PAGE_SIZE=0x1000 GENERATE_AUTO_IMPORT_SCRIPT=1 +DEFAULT_MANIFEST="default-manifest.o" -- cgit v1.1