[WebAssembly] Remove ELF-ness.

These output section names are ELF-specific. We shouldn't have this rule
for WebAssembly.

Differential Revision: https://reviews.llvm.org/D43712

llvm-svn: 326289
diff --git a/lld/wasm/Writer.cpp b/lld/wasm/Writer.cpp
index 5a347e4..b478ef3 100644
--- a/lld/wasm/Writer.cpp
+++ b/lld/wasm/Writer.cpp
@@ -839,16 +839,12 @@
 static StringRef getOutputDataSegmentName(StringRef Name) {
   if (Config->Relocatable)
     return Name;
-
-  for (StringRef V :
-       {".text.", ".rodata.", ".data.rel.ro.", ".data.", ".bss.rel.ro.",
-        ".bss.", ".init_array.", ".fini_array.", ".ctors.", ".dtors.", ".tbss.",
-        ".gcc_except_table.", ".tdata.", ".ARM.exidx.", ".ARM.extab."}) {
-    StringRef Prefix = V.drop_back();
-    if (Name.startswith(V) || Name == Prefix)
-      return Prefix;
-  }
-
+  if (Name.startswith(".text."))
+    return ".text";
+  if (Name.startswith(".data."))
+    return ".data";
+  if (Name.startswith(".bss."))
+    return ".bss";
   return Name;
 }