diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -306,6 +306,8 @@ std::string srcFile = std::string(getFile()->sourceFile); if (srcFile.empty()) srcFile = toString(file); + else if (!file->archiveName.empty()) + srcFile = file->archiveName + "(" + srcFile + ")"; if (Defined *d = getEnclosingFunction(offset)) return srcFile + ":(function " + toString(*d) + ": " + secAndOffset + ")";