Revert "ELF: Make .note.GNU-stack more compatible with traditional linkers."

This reverts commit r253797 because it was based on a misunderstanding
that lld wouldn't work on NetBSD without this change.

llvm-svn: 254003
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index 9930f28..175ccd3 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -174,7 +174,6 @@
   uint64_t Size = this->ELFObj.getNumSections();
   Sections.resize(Size);
   unsigned I = -1;
-  bool HasGnuStack = false;
   const ELFFile<ELFT> &Obj = this->ELFObj;
   for (const Elf_Shdr &Sec : Obj.sections()) {
     ++I;
@@ -229,21 +228,17 @@
       ErrorOr<StringRef> NameOrErr = this->ELFObj.getSectionName(&Sec);
       error(NameOrErr);
       StringRef Name = *NameOrErr;
-      if (Name == ".note.GNU-stack") {
+      if (Name == ".note.GNU-stack")
         Sections[I] = &InputSection<ELFT>::Discarded;
-        HasGnuStack = true;
-      } else if (Name == ".eh_frame") {
+      else if (Name == ".eh_frame")
         Sections[I] = new (this->Alloc) EHInputSection<ELFT>(this, &Sec);
-      } else if (shouldMerge<ELFT>(Sec)) {
+      else if (shouldMerge<ELFT>(Sec))
         Sections[I] = new (this->Alloc) MergeInputSection<ELFT>(this, &Sec);
-      } else {
+      else
         Sections[I] = new (this->Alloc) InputSection<ELFT>(this, &Sec);
-      }
       break;
     }
   }
-  if (!HasGnuStack)
-    Config->ZExecStack = true;
 }
 
 template <class ELFT> void elf2::ObjectFile<ELFT>::initializeSymbols() {