* [PATCH] Do not use DLL entry point for executables
@ 2020-08-28 9:44 fziglio
2020-09-22 11:49 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: fziglio @ 2020-08-28 9:44 UTC (permalink / raw)
To: binutils; +Cc: Frediano Ziglio
From: Frediano Ziglio <fziglio@redhat.com>
bfd_link_pic check for dll or pie type.
If the type is pie the results should be an executable which
entry point should be an executable entry point, not a DLL
one.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
ld/emultempl/pe.em | 2 +-
ld/emultempl/pep.em | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 9d2097f486..8b44d65c1d 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -571,7 +571,7 @@ set_entry_point (void)
/* Entry point name for arbitrary subsystem numbers. */
static const char default_entry[] = "mainCRTStartup";
- if (bfd_link_pic (&link_info) || dll)
+ if (bfd_link_dll (&link_info) || dll)
{
#if defined (TARGET_IS_i386pe)
entry = "DllMainCRTStartup@12";
diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em
index 7d9395168d..4cf38428d8 100644
--- a/ld/emultempl/pep.em
+++ b/ld/emultempl/pep.em
@@ -537,7 +537,7 @@ set_entry_point (void)
/* Entry point name for arbitrary subsystem numbers. */
static const char default_entry[] = "mainCRTStartup";
- if (bfd_link_pic (&link_info) || dll)
+ if (bfd_link_dll (&link_info) || dll)
{
entry = "DllMainCRTStartup";
}
--
2.25.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Do not use DLL entry point for executables
2020-08-28 9:44 [PATCH] Do not use DLL entry point for executables fziglio
@ 2020-09-22 11:49 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2020-09-22 11:49 UTC (permalink / raw)
To: fziglio, binutils
Hi Frediano,
> bfd_link_pic check for dll or pie type.> If the type is pie the results should be an executable which> entry point should be an executable entry point, not a DLL> one.
Patch approved and applied. Thanks for pointing out this problem.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-22 11:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28 9:44 [PATCH] Do not use DLL entry point for executables fziglio
2020-09-22 11:49 ` Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).