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

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 03:17:43 PDT 2016


grimar created this revision.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar.

-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.

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
@@ -364,7 +364,7 @@
     error("number of threads must be > 0");
 
   Config->ZCombreloc = !hasZOption(Args, "nocombreloc");
-  Config->ZDefs = hasZOption(Args, "defs");
+  Config->NoUndefined = Config->NoUndefined || 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.62072.patch
Type: text/x-patch
Size: 1312 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160628/400ac4a4/attachment.bin>


More information about the llvm-commits mailing list