[patch]: Unify and cleanup entry point handling for PE targets
Kai Tietz
Kai.Tietz@onevision.com
Wed Oct 28 11:24:00 GMT 2009
Hello all,
this patch takes care that PE-coff targets are automatically using
DllMainCRTStartup entry point for --shared and/or --dll option. Also it
cleans up with the use of ENTRY in pe.em, pep.em, and its related
shell-scripts in emulparams.
2009-10-28 Kai Tietz <kai.tietz@onevision.com>
* 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.
Additional cleaned up with double defined
variables for SUBSYSTEM and INITIAL_SYMBOL_CHAR.
* emultempl/pe.em: Remove use of ENTRY.
(is_linked_dll): New local variable.
(pe_subsystem): New local variable.
(gld_XXX_before_parse): Don't set here default
entry point.
(set_entry_point): New function to set entry
point.
(set_pe_subsystem): Remove code for entry point.
(gld_XXX_handle_option): Set for OPTION_DLL value
is_linked_dll to true.
(gld_XXX_after_parse):Use here set_entry_point.
* emultempl/pep.em: Likewise.
This patch is tested for i686-pc-mingw32, and x86_64-pc-mingw32,
i686-pc-cygwin. For the bfd targets arm-epoc-pe, arm-wince-pe,
i686pe-posix, mips-pe, ppc-pe, arm-pe, sh-pe, and mcore-pe just cross
toolchain tests were done by me. All tests didn't produced any new
failures. Is this patch ok for apply?
Cheers,
Kai
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ld_peentry.diff
Type: application/octet-stream
Size: 15147 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20091028/2a946c92/attachment.obj>
More information about the Binutils
mailing list