summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Driver.cpp
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2017-07-26 09:46:59 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2017-07-26 09:46:59 +0000
commit84941ef1585789956156d2067649f27a5b360ae8 (patch)
treeb7b17f45b68a16c7650814a8241aafd426957c50 /lld/ELF/Driver.cpp
parentb1fd7849361f16b9059ddd6956c0f3f2eca784b3 (diff)
downloadbcm5719-llvm-84941ef1585789956156d2067649f27a5b360ae8.tar.gz
bcm5719-llvm-84941ef1585789956156d2067649f27a5b360ae8.zip
[ELF] - Change way how we handle --noinhibit-exec
Previously we handled this option implicitly, only for infering unresolved symbols handling policy. ld man says: "--noinhibit-exec Retain the executable output file whenever it is still usable", and we may want to handle other cases too. Differential revision: https://reviews.llvm.org/D35793 llvm-svn: 309091
Diffstat (limited to 'lld/ELF/Driver.cpp')
-rw-r--r--lld/ELF/Driver.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 1dcd69b3b9e..b77e867eab2 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -418,9 +418,6 @@ static std::string getRpath(opt::InputArgList &Args) {
// Determines what we should do if there are remaining unresolved
// symbols after the name resolution.
static UnresolvedPolicy getUnresolvedSymbolPolicy(opt::InputArgList &Args) {
- // -noinhibit-exec or -r imply some default values.
- if (Args.hasArg(OPT_noinhibit_exec))
- return UnresolvedPolicy::WarnAll;
if (Args.hasArg(OPT_relocatable))
return UnresolvedPolicy::IgnoreAll;
@@ -648,6 +645,7 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) {
Config->MapFile = Args.getLastArgValue(OPT_Map);
Config->NoGnuUnique = Args.hasArg(OPT_no_gnu_unique);
Config->NoUndefinedVersion = Args.hasArg(OPT_no_undefined_version);
+ Config->NoinhibitExec = Args.hasArg(OPT_noinhibit_exec);
Config->Nostdlib = Args.hasArg(OPT_nostdlib);
Config->OFormatBinary = isOutputFormatBinary(Args);
Config->Omagic = Args.hasArg(OPT_omagic);
OpenPOWER on IntegriCloud