diff options
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rw-r--r-- | ld/emultempl/pe.em | 2 | ||||
-rw-r--r-- | ld/emultempl/pep.em | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index cffb271..dfa58a9 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2020-09-22 Frediano Ziglio <fziglio@redhat.com> + + * emultempl/pe.em (set_entry_point): Only use the DLL entry point + for DLLs. + * emultempl/pep.em (set_entry_point): Likewise. + 2020-09-16 Mikael Pettersson <mikpelinux@gmail.com> * testsuite/ld-elf/shared.exp: Add -Av9 to AFLAGS_PIE on sparc. diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index 055d08d..22993c5 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 f161cce..b0a0471 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"; } |