Index: COFF/InputFiles.cpp =================================================================== --- COFF/InputFiles.cpp +++ COFF/InputFiles.cpp @@ -411,7 +411,7 @@ // Returns a string in the format of "foo.obj" or "foo.obj(bar.lib)". std::string lld::toString(coff::InputFile *File) { if (!File) - return "(internal)"; + return ""; if (File->ParentName.empty()) return File->getName().lower(); Index: COFF/SymbolTable.cpp =================================================================== --- COFF/SymbolTable.cpp +++ COFF/SymbolTable.cpp @@ -200,8 +200,7 @@ void SymbolTable::reportDuplicate(Symbol *Existing, InputFile *NewFile) { error("duplicate symbol: " + toString(*Existing) + " in " + - toString(Existing->getFile()) + " and in " + - (NewFile ? toString(NewFile) : "(internal)")); + toString(Existing->getFile()) + " and in " + toString(NewFile)); } Symbol *SymbolTable::addAbsolute(StringRef N, COFFSymbolRef Sym) { Index: ELF/InputFiles.h =================================================================== --- ELF/InputFiles.h +++ ELF/InputFiles.h @@ -42,7 +42,7 @@ class InputFile; } -// Returns "(internal)", "foo.a(bar.o)" or "baz.o". +// Returns "", "foo.a(bar.o)" or "baz.o". std::string toString(const elf::InputFile *F); namespace elf { Index: ELF/InputSection.cpp =================================================================== --- ELF/InputSection.cpp +++ ELF/InputSection.cpp @@ -308,7 +308,7 @@ std::string InputSectionBase::getObjMsg(uint64_t Off) { // Synthetic sections don't have input files. if (!File) - return ("(internal):(" + Name + "+0x" + utohexstr(Off) + ")").str(); + return (":(" + Name + "+0x" + utohexstr(Off) + ")").str(); std::string Filename = File->getName(); std::string Archive; Index: test/ELF/duplicated-synthetic-sym.s =================================================================== --- test/ELF/duplicated-synthetic-sym.s +++ test/ELF/duplicated-synthetic-sym.s @@ -4,7 +4,7 @@ // RUN: not ld.lld %t.o --format binary duplicated-synthetic-sym.s -o %t.elf 2>&1 | FileCheck %s // CHECK: duplicate symbol: _binary_duplicated_synthetic_sym_s_start -// CHECK: defined at (internal):(.data+0x0) +// CHECK: defined at :(.data+0x0) .globl _binary_duplicated_synthetic_sym_s_start _binary_duplicated_synthetic_sym_s_start: Index: wasm/SymbolTable.cpp =================================================================== --- wasm/SymbolTable.cpp +++ wasm/SymbolTable.cpp @@ -86,7 +86,7 @@ if (Existing->isFunction() == NewIsFunction) return; - std::string Filename = ""; + std::string Filename = ""; if (Existing->getFile()) Filename = toString(Existing->getFile()); error("symbol type mismatch: " + New->Name + "\n>>> defined as " +