[PATCH] D109400: [LLD] Add archive Name to relocaiton overflow printout
Alexander Yermolovich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 7 16:04:37 PDT 2021
ayermolo created this revision.
Herald added subscribers: hoy, modimo, wenlei, arichardson, emaste.
Herald added a reviewer: MaskRay.
ayermolo requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
When sourceFile is found only it is being printed. For root causing relocation overflows it's good to know from which archive it came from.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D109400
Files:
lld/ELF/InputSection.cpp
Index: lld/ELF/InputSection.cpp
===================================================================
--- lld/ELF/InputSection.cpp
+++ lld/ELF/InputSection.cpp
@@ -306,6 +306,8 @@
std::string srcFile = std::string(getFile<ELFT>()->sourceFile);
if (srcFile.empty())
srcFile = toString(file);
+ else if (!file->archiveName.empty())
+ srcFile = file->archiveName + "(" + srcFile + ")";
if (Defined *d = getEnclosingFunction<ELFT>(offset))
return srcFile + ":(function " + toString(*d) + ": " + secAndOffset + ")";
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109400.371208.patch
Type: text/x-patch
Size: 534 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210907/cd846018/attachment.bin>
More information about the llvm-commits
mailing list