[WebAssembly] Write DWARF data into wasm object file

- Writes ".debug_XXX" into corresponding custom sections.
- Writes relocation records into "reloc.debug_XXX" sections.

Patch by Yury Delendik!

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

llvm-svn: 330982
diff --git a/llvm/tools/obj2yaml/wasm2yaml.cpp b/llvm/tools/obj2yaml/wasm2yaml.cpp
index 55fc2bf..dbaf1a2 100644
--- a/llvm/tools/obj2yaml/wasm2yaml.cpp
+++ b/llvm/tools/obj2yaml/wasm2yaml.cpp
@@ -106,6 +106,9 @@
       case wasm::WASM_SYMBOL_TYPE_GLOBAL:
         Info.ElementIndex = Symbol.ElementIndex;
         break;
+      case wasm::WASM_SYMBOL_TYPE_SECTION:
+        Info.ElementIndex = Symbol.ElementIndex;
+        break;
       }
       LinkingSec->SymbolTable.emplace_back(Info);
     }