From e60cc41502a4f1e00e70af0d3e2ceaca1ec6e15a Mon Sep 17 00:00:00 2001 From: Danny Smith Date: Wed, 5 Oct 2005 08:07:51 +0000 Subject: [PATCH] * emultempl/pe.em (gld_${EMULATION_NAME}_before_parse): Set default entry symbol to ENTRY here. * scripttempl/pe.sc: Not here. --- ld/ChangeLog | 6 ++++++ ld/emultempl/pe.em | 3 +++ ld/scripttempl/pe.sc | 2 -- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 786fe348f6..515ffd8887 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2005-10-05 Danny Smith + + * emultempl/pe.em (gld_${EMULATION_NAME}_before_parse): Set + default entry symbol to ENTRY here. + * scripttempl/pe.sc: Not here. + 2005-09-30 James E Wilson * ldlang.c (lang_startup): Add missing ": " to einfo call. diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index df7692d680..a4ed25d446 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -1,5 +1,6 @@ # 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 @@ -143,6 +144,8 @@ gld_${EMULATION_NAME}_before_parse (void) #else lang_default_entry ("_WinMainCRTStartup"); #endif +#else + lang_default_entry ("${ENTRY}"); #endif #endif } diff --git a/ld/scripttempl/pe.sc b/ld/scripttempl/pe.sc index 69890f15f3..c9931b5148 100644 --- a/ld/scripttempl/pe.sc +++ b/ld/scripttempl/pe.sc @@ -50,8 +50,6 @@ ${OUTPUT_ARCH+OUTPUT_ARCH(${OUTPUT_ARCH})} ${LIB_SEARCH_DIRS} -ENTRY(${ENTRY}) - SECTIONS { ${RELOCATING+/* Make the virtual address and file offset synced if the alignment is} -- 2.34.1