[WebAssembly] Attach a name to globals similarly to function naming

This allows LLD to print the name for an InputGlobal when encountering
an error.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326691 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed