summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Driver.cpp')
-rw-r--r--lld/ELF/Driver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index a2c96b87f34..67f067847c0 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -570,7 +570,6 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) {
Config->SortSection = getSortKind(Args);
Config->Target2 = getTarget2Option(Args);
Config->UnresolvedSymbols = getUnresolvedSymbolOption(Args);
- Config->WarnMissingEntry = (Args.hasArg(OPT_entry) || !Config->Shared);
// --omagic is an option to create old-fashioned executables in which
// .text segments are writable. Today, the option is still in use to
@@ -779,6 +778,7 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &Args) {
// Use default entry point name if no name was given via the command
// line nor linker scripts. For some reason, MIPS entry point name is
// different from others.
+ Config->WarnMissingEntry = (!Config->Entry.empty() || !Config->Shared);
if (Config->Entry.empty() && !Config->Relocatable)
Config->Entry = (Config->EMachine == EM_MIPS) ? "__start" : "_start";
OpenPOWER on IntegriCloud