[llvm] [llvm-objdump] Handle .callgraph section (PR #151009)
Paul Kirth via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 28 13:57:13 PDT 2025
================
@@ -3131,6 +3225,207 @@ void Dumper::printSymbol(const SymbolRef &Symbol,
outs() << ' ' << SymName << '\n';
}
+static void printCallGraphInfo(ObjectFile *Obj) {
+ // Get function info through disassembly.
+ disassembleObject(Obj, /*InlineRelocs=*/false, outs());
+
+ // Get the .callgraph section.
+ StringRef CallGraphSectionName(".callgraph");
+ std::optional<object::SectionRef> CallGraphSection;
+ for (auto Sec : ToolSectionFilter(*Obj)) {
+ StringRef Name;
+ if (Expected<StringRef> NameOrErr = Sec.getName())
+ Name = *NameOrErr;
+ else
+ consumeError(NameOrErr.takeError());
----------------
ilovepi wrote:
Should this return the error? or maybe at least continue to the next iteration?
https://github.com/llvm/llvm-project/pull/151009
More information about the llvm-commits
mailing list