[lld] r274003 - [ELF] - Remove Config->ZDefs flag.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 28 05:04:21 PDT 2016
Author: grimar
Date: Tue Jun 28 07:04:19 2016
New Revision: 274003
URL: http://llvm.org/viewvc/llvm-project?rev=274003&view=rev
Log:
[ELF] - Remove Config->ZDefs flag.
-z defs is the same as --no-undefined (http://linux.die.net/man/1/ld).
It looks to be a error to handle it separatelly.
Differential revision: http://reviews.llvm.org/D21788
Modified:
lld/trunk/ELF/Config.h
lld/trunk/ELF/Driver.cpp
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Config.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Config.h?rev=274003&r1=274002&r2=274003&view=diff
==============================================================================
--- lld/trunk/ELF/Config.h (original)
+++ lld/trunk/ELF/Config.h Tue Jun 28 07:04:19 2016
@@ -105,7 +105,6 @@ struct Configuration {
bool VersionScriptGlobalByDefault = true;
bool WarnCommon;
bool ZCombreloc;
- bool ZDefs;
bool ZExecStack;
bool ZNodelete;
bool ZNow;
Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=274003&r1=274002&r2=274003&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Tue Jun 28 07:04:19 2016
@@ -330,7 +330,8 @@ void LinkerDriver::readConfigs(opt::Inpu
Config->GcSections = Args.hasArg(OPT_gc_sections);
Config->ICF = Args.hasArg(OPT_icf);
Config->NoGnuUnique = Args.hasArg(OPT_no_gnu_unique);
- Config->NoUndefined = Args.hasArg(OPT_no_undefined);
+ Config->NoUndefined =
+ Args.hasArg(OPT_no_undefined) || hasZOption(Args, "defs");
Config->NoUndefinedVersion = Args.hasArg(OPT_no_undefined_version);
Config->NoinhibitExec = Args.hasArg(OPT_noinhibit_exec);
Config->Pie = Args.hasArg(OPT_pie);
@@ -364,7 +365,6 @@ void LinkerDriver::readConfigs(opt::Inpu
error("number of threads must be > 0");
Config->ZCombreloc = !hasZOption(Args, "nocombreloc");
- Config->ZDefs = hasZOption(Args, "defs");
Config->ZExecStack = hasZOption(Args, "execstack");
Config->ZNodelete = hasZOption(Args, "nodelete");
Config->ZNow = hasZOption(Args, "now");
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=274003&r1=274002&r2=274003&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Tue Jun 28 07:04:19 2016
@@ -277,9 +277,8 @@ static void reportUndefined(SymbolTable<
if (!Config->NoUndefined) {
if (Config->Relocatable)
return;
- if (Config->Shared && !Config->ZDefs)
- if (Sym->symbol()->Visibility == STV_DEFAULT)
- return;
+ if (Config->Shared && Sym->symbol()->Visibility == STV_DEFAULT)
+ return;
}
std::string Msg = "undefined symbol: " + Sym->getName().str();
More information about the llvm-commits
mailing list