[llvm] [llvm-readobj] Dump callgraph section info for ELF (PR #157499)
Prabhu Rajasekaran via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 31 14:08:04 PDT 2025
================
@@ -432,9 +447,39 @@ template <typename ELFT> class ELFDumper : public ObjDumper {
const SFrameParser<ELFT::Endianness> &Parser,
const typename SFrameParser<ELFT::Endianness>::FDERange::iterator FDE,
ArrayRef<Relocation<ELFT>> Relocations, const Elf_Shdr *RelocSymTab);
+ // Callgraph - Main data structure to maintain per function callgraph
+ // information.
+ SmallVector<FunctionCallgraphInfo, 16> FuncCGInfos;
+
+ // // Callgraph - 64 bit type id mapped to entry PC addresses of functions
+ // which
+ // // are of the given type id.
+ // MapVector<uint64_t, SmallVector<typename ELFT::uint>> TypeIdToIndirTargets;
+
+ // Callgraph - Read callgraph section and process its contents to populate
+ // Callgraph related data structures which will be used to dump callgraph
+ // info. Returns false if there is no .llvm.callgraph section in the input
+ // file.
+ bool processCallGraphSection();
+
+ void getCallGraphRelocations(std::vector<Relocation<ELFT>> &Relocations,
+ const Elf_Shdr *&RelocSymTab);
private:
mutable SmallVector<std::optional<VersionEntry>, 0> VersionMap;
+
+protected:
+ std::string getFunctionNames(uint64_t FuncAddr) {
----------------
Prabhuk wrote:
Renamed it back to getFunctionNames and it returns a smallvector of std::string
https://github.com/llvm/llvm-project/pull/157499
More information about the llvm-commits
mailing list