From decfa41eace0c91b6245c236c5286a6bc984d153 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Wed, 4 Nov 2009 18:13:05 +0000 Subject: [PATCH] 2009-11-04 Kai Tietz * emulparams/arm_epoc_pe.sh: Remove ENTRY. * emulparams/arm_wince_pe.sh: Likewise. * emulparams/i386pe.sh: Likewise. * emulparams/i386pe_posix.sh: Likewise. * emulparams/mcorepe.sh: Likewise. * emulparams/mipspe.sh: Likewise. * emulparams/ppcpe.sh: Likewise. * emulparams/armpe.sh: Likewise. * emulparams/i386pep.sh: Likewise. * emulparams/shpe.sh: Likewise. Additionally cleaned up double-defined variables SUBSYSTEM and INITIAL_SYMBOL_CHAR. * emultempl/pe.em: Remove use of ENTRY. (pe_subsystem): New local variable. (gld_XXX_before_parse): Don't set default entry point here. (set_entry_point): New function to set entry point. (set_pe_subsystem): Remove code for entry point. (gld_XXX_after_parse): Use set_entry_point here. * emultempl/pep.em: Likewise. --- ld/ChangeLog | 24 ++++++ ld/emulparams/arm_epoc_pe.sh | 1 - ld/emulparams/arm_wince_pe.sh | 1 - ld/emulparams/armpe.sh | 1 - ld/emulparams/i386pe.sh | 1 - ld/emulparams/i386pe_posix.sh | 1 - ld/emulparams/i386pep.sh | 1 - ld/emulparams/mcorepe.sh | 1 - ld/emulparams/mipspe.sh | 1 - ld/emulparams/ppcpe.sh | 1 - ld/emulparams/shpe.sh | 3 - ld/emultempl/pe.em | 133 ++++++++++++++++++++-------------- ld/emultempl/pep.em | 120 ++++++++++++++++++------------ 13 files changed, 177 insertions(+), 112 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 90fa7423c20..c901357888f 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,27 @@ +2009-11-04 Kai Tietz + + * emulparams/arm_epoc_pe.sh: Remove ENTRY. + * emulparams/arm_wince_pe.sh: Likewise. + * emulparams/i386pe.sh: Likewise. + * emulparams/i386pe_posix.sh: Likewise. + * emulparams/mcorepe.sh: Likewise. + * emulparams/mipspe.sh: Likewise. + * emulparams/ppcpe.sh: Likewise. + * emulparams/armpe.sh: Likewise. + * emulparams/i386pep.sh: Likewise. + * emulparams/shpe.sh: Likewise. + Additionally cleaned up double-defined + variables SUBSYSTEM and INITIAL_SYMBOL_CHAR. + * emultempl/pe.em: Remove use of ENTRY. + (pe_subsystem): New local variable. + (gld_XXX_before_parse): Don't set default + entry point here. + (set_entry_point): New function to set entry + point. + (set_pe_subsystem): Remove code for entry point. + (gld_XXX_after_parse): Use set_entry_point here. + * emultempl/pep.em: Likewise. + 2009-10-29 Nathan Sidwell * emulparams/vxworks.sh (OTHER_READONLY_SECTIONS): Move into ... diff --git a/ld/emulparams/arm_epoc_pe.sh b/ld/emulparams/arm_epoc_pe.sh index 7cc4b220fae..51a3f764c7a 100644 --- a/ld/emulparams/arm_epoc_pe.sh +++ b/ld/emulparams/arm_epoc_pe.sh @@ -4,7 +4,6 @@ OUTPUT_FORMAT="epoc-pei-arm-little" LITTLE_OUTPUT_FORMAT="epoc-pei-arm-little" BIG_OUTPUT_FORMAT="epoc-pei-arm-big" TEMPLATE_NAME=pe -ENTRY="_mainCRTStartup" SUBSYSTEM=PE_DEF_SUBSYSTEM INITIAL_SYMBOL_CHAR=\"_\" TARGET_PAGE_SIZE=0x1000 diff --git a/ld/emulparams/arm_wince_pe.sh b/ld/emulparams/arm_wince_pe.sh index 2d0019fc47a..133a51c2f90 100644 --- a/ld/emulparams/arm_wince_pe.sh +++ b/ld/emulparams/arm_wince_pe.sh @@ -8,7 +8,6 @@ BIG_OUTPUT_FORMAT="pei-arm-wince-big" RELOCATEABLE_OUTPUT_FORMAT="pe-arm-wince-little" TEMPLATE_NAME=pe -ENTRY="WinMainCRTStartup" SUBSYSTEM=PE_DEF_SUBSYSTEM INITIAL_SYMBOL_CHAR=\"\" TARGET_PAGE_SIZE=0x1000 diff --git a/ld/emulparams/armpe.sh b/ld/emulparams/armpe.sh index 5db5faf3468..0c711a5975c 100644 --- a/ld/emulparams/armpe.sh +++ b/ld/emulparams/armpe.sh @@ -8,7 +8,6 @@ BIG_OUTPUT_FORMAT="pei-arm-big" RELOCATEABLE_OUTPUT_FORMAT="pe-arm-little" TEMPLATE_NAME=pe -ENTRY="_mainCRTStartup" SUBSYSTEM=PE_DEF_SUBSYSTEM INITIAL_SYMBOL_CHAR=\"_\" diff --git a/ld/emulparams/i386pe.sh b/ld/emulparams/i386pe.sh index ecafd698e0f..38191ecb24c 100644 --- a/ld/emulparams/i386pe.sh +++ b/ld/emulparams/i386pe.sh @@ -3,7 +3,6 @@ SCRIPT_NAME=pe OUTPUT_FORMAT="pei-i386" RELOCATEABLE_OUTPUT_FORMAT="pe-i386" TEMPLATE_NAME=pe -ENTRY="_mainCRTStartup" SUBSYSTEM=PE_DEF_SUBSYSTEM INITIAL_SYMBOL_CHAR=\"_\" TARGET_PAGE_SIZE=0x1000 diff --git a/ld/emulparams/i386pe_posix.sh b/ld/emulparams/i386pe_posix.sh index 9348e648c7e..cde0349765d 100644 --- a/ld/emulparams/i386pe_posix.sh +++ b/ld/emulparams/i386pe_posix.sh @@ -3,7 +3,6 @@ SCRIPT_NAME=pe OUTPUT_FORMAT="pei-i386" RELOCATEABLE_OUTPUT_FORMAT="pe-i386" TEMPLATE_NAME=pe -ENTRY="___PosixProcessStartup" SUBSYSTEM=7 EXECUTABLE_NAME=a.out INITIAL_SYMBOL_CHAR=\"_\" diff --git a/ld/emulparams/i386pep.sh b/ld/emulparams/i386pep.sh index 7145f355394..76a980287c7 100644 --- a/ld/emulparams/i386pep.sh +++ b/ld/emulparams/i386pep.sh @@ -3,7 +3,6 @@ SCRIPT_NAME=pep OUTPUT_FORMAT="pei-x86-64" RELOCATEABLE_OUTPUT_FORMAT="pe-x86-64" TEMPLATE_NAME=pep -ENTRY="_mainCRTStartup" SUBSYSTEM=PE_DEF_SUBSYSTEM INITIAL_SYMBOL_CHAR=\"_\" TARGET_PAGE_SIZE=0x1000 diff --git a/ld/emulparams/mcorepe.sh b/ld/emulparams/mcorepe.sh index 8326c2e5144..95d84e7f049 100644 --- a/ld/emulparams/mcorepe.sh +++ b/ld/emulparams/mcorepe.sh @@ -4,7 +4,6 @@ OUTPUT_FORMAT="pei-mcore-little" LITTLE_OUTPUT_FORMAT="pei-mcore-little" BIG_OUTPUT_FORMAT="pei-mcore-big" TEMPLATE_NAME=pe -ENTRY="_mainCRTStartup" SUBSYSTEM=PE_DEF_SUBSYSTEM INITIAL_SYMBOL_CHAR=\"_\" TARGET_PAGE_SIZE=0x1000 diff --git a/ld/emulparams/mipspe.sh b/ld/emulparams/mipspe.sh index a5cfc2ef60e..95c4adb71a7 100644 --- a/ld/emulparams/mipspe.sh +++ b/ld/emulparams/mipspe.sh @@ -6,5 +6,4 @@ RELOCATEABLE_OUTPUT_FORMAT="ecoff-littlemips" TEMPLATE_NAME=pe SUBSYSTEM=PE_DEF_SUBSYSTEM INITIAL_SYMBOL_CHAR=\"_\" -ENTRY="_mainCRTStartup" TARGET_PAGE_SIZE=0x1000 diff --git a/ld/emulparams/ppcpe.sh b/ld/emulparams/ppcpe.sh index 2e1e10207c8..ed7df88dcd2 100644 --- a/ld/emulparams/ppcpe.sh +++ b/ld/emulparams/ppcpe.sh @@ -2,7 +2,6 @@ ARCH=powerpc SCRIPT_NAME=ppcpe OUTPUT_FORMAT="pei-powerpcle" TEMPLATE_NAME=pe -ENTRY="_mainCRTStartup" SUBSYSTEM=PE_DEF_SUBSYSTEM INITIAL_SYMBOL_CHAR=\"_\" TARGET_PAGE_SIZE=0x1000 diff --git a/ld/emulparams/shpe.sh b/ld/emulparams/shpe.sh index d50861f55d5..89fa461efd0 100644 --- a/ld/emulparams/shpe.sh +++ b/ld/emulparams/shpe.sh @@ -4,7 +4,4 @@ OUTPUT_FORMAT="pei-shl" TEMPLATE_NAME=pe SUBSYSTEM=PE_DEF_SUBSYSTEM INITIAL_SYMBOL_CHAR=\"_\" -ENTRY="_mainCRTStartup" -SUBSYSTEM=PE_DEF_SUBSYSTEM -INITIAL_SYMBOL_CHAR=\"_\" TARGET_PAGE_SIZE=0x1000 diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index d233bd1f9b0..f926502bb52 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -1,6 +1,5 @@ # This shell script emits a C file. -*- C -*- # It does some substitutions. -test -z "${ENTRY}" && ENTRY="_mainCRTStartup" if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH} else @@ -122,6 +121,7 @@ fragment <