Index: lld/trunk/wasm/Writer.cpp =================================================================== --- lld/trunk/wasm/Writer.cpp +++ lld/trunk/wasm/Writer.cpp @@ -304,9 +304,9 @@ // gold provide the feature, and used by many programs. static void addStartStopSymbols(const OutputSegment *Seg) { StringRef Name = Seg->Name; - LLVM_DEBUG(dbgs() << "addStartStopSymbols: " << Name << "\n"); if (!isValidCIdentifier(Name)) return; + LLVM_DEBUG(dbgs() << "addStartStopSymbols: " << Name << "\n"); uint32_t Start = Seg->StartVA; uint32_t Stop = Start + Seg->Size; Symtab->addOptionalDataSymbol(Saver.save("__start_" + Name), Start); @@ -601,7 +601,7 @@ // With PIC code we currently only support a single data segment since // we only have a single __memory_base to use as our base address. if (Config->Pic) - return "data"; + return ".data"; if (!Config->MergeDataSegments) return Name; if (Name.startswith(".text."))