[PATCH] D21788: [ELF] - Remove Config->ZDefs flag.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 04:53:39 PDT 2016


grimar updated this revision to Diff 62075.
grimar added a comment.

- Addressed review comments.


http://reviews.llvm.org/D21788

Files:
  ELF/Config.h
  ELF/Driver.cpp
  ELF/Writer.cpp

Index: ELF/Writer.cpp
===================================================================
--- ELF/Writer.cpp
+++ ELF/Writer.cpp
@@ -277,9 +277,8 @@
   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();
Index: ELF/Driver.cpp
===================================================================
--- ELF/Driver.cpp
+++ ELF/Driver.cpp
@@ -330,7 +330,8 @@
   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 @@
     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");
Index: ELF/Config.h
===================================================================
--- ELF/Config.h
+++ ELF/Config.h
@@ -105,7 +105,6 @@
   bool VersionScriptGlobalByDefault = true;
   bool WarnCommon;
   bool ZCombreloc;
-  bool ZDefs;
   bool ZExecStack;
   bool ZNodelete;
   bool ZNow;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21788.62075.patch
Type: text/x-patch
Size: 1759 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160628/418c4f2b/attachment.bin>


More information about the llvm-commits mailing list