LLVM
15.0.0git
|
Ling-graph building code that's specific to the given ELFT, but common across all architectures. More...
#include "ExecutionEngine/JITLink/ELFLinkGraphBuilder.h"
Public Member Functions | |
ELFLinkGraphBuilder (const object::ELFFile< ELFT > &Obj, Triple TT, StringRef FileName, LinkGraph::GetEdgeKindNameFunction GetEdgeKindName) | |
Expected< std::unique_ptr< LinkGraph > > | buildGraph () |
Attempt to construct and return the LinkGraph. More... | |
virtual Error | addRelocations ()=0 |
Call to derived class to handle relocations. More... | |
![]() | |
ELFLinkGraphBuilderBase (std::unique_ptr< LinkGraph > G) | |
virtual | ~ELFLinkGraphBuilderBase () |
Protected Types | |
using | ELFSectionIndex = unsigned |
using | ELFSymbolIndex = unsigned |
Protected Member Functions | |
bool | isRelocatable () const |
void | setGraphBlock (ELFSectionIndex SecIndex, Block *B) |
Block * | getGraphBlock (ELFSectionIndex SecIndex) |
void | setGraphSymbol (ELFSymbolIndex SymIndex, Symbol &Sym) |
Symbol * | getGraphSymbol (ELFSymbolIndex SymIndex) |
Expected< std::pair< Linkage, Scope > > | getSymbolLinkageAndScope (const typename ELFT::Sym &Sym, StringRef Name) |
Error | prepare () |
Error | graphifySections () |
Error | graphifySymbols () |
template<typename RelocHandlerFunction > | |
Error | forEachRelocation (const typename ELFT::Shdr &RelSect, RelocHandlerFunction &&Func, bool ProcessDebugSections=false) |
Traverse all matching relocation records in the given section. More... | |
template<typename ClassT , typename RelocHandlerMethod > | |
Error | forEachRelocation (const typename ELFT::Shdr &RelSect, ClassT *Instance, RelocHandlerMethod &&Method, bool ProcessDebugSections=false) |
Traverse all matching relocation records in the given section. More... | |
![]() | |
Section & | getCommonSection () |
Protected Attributes | |
const ELFFile & | Obj |
ELFFile::Elf_Shdr_Range | Sections |
const ELFFile::Elf_Shdr * | SymTabSec = nullptr |
StringRef | SectionStringTab |
DenseMap< ELFSectionIndex, Block * > | GraphBlocks |
DenseMap< ELFSymbolIndex, Symbol * > | GraphSymbols |
DenseMap< const typename ELFFile::Elf_Shdr *, ArrayRef< typename ELFFile::Elf_Word > > | ShndxTables |
![]() | |
std::unique_ptr< LinkGraph > | G |
Additional Inherited Members | |
![]() | |
static bool | isDwarfSection (StringRef SectionName) |
Ling-graph building code that's specific to the given ELFT, but common across all architectures.
Definition at line 57 of file ELFLinkGraphBuilder.h.
|
protected |
Definition at line 73 of file ELFLinkGraphBuilder.h.
|
protected |
Definition at line 74 of file ELFLinkGraphBuilder.h.
llvm::jitlink::ELFLinkGraphBuilder< ELFT >::ELFLinkGraphBuilder | ( | const object::ELFFile< ELFT > & | Obj, |
Triple | TT, | ||
StringRef | FileName, | ||
LinkGraph::GetEdgeKindNameFunction | GetEdgeKindName | ||
) |
Definition at line 152 of file ELFLinkGraphBuilder.h.
|
pure virtual |
Call to derived class to handle relocations.
These require architecture specific knowledge to map to JITLink edge kinds.
Expected< std::unique_ptr< LinkGraph > > llvm::jitlink::ELFLinkGraphBuilder< ELFT >::buildGraph |
Attempt to construct and return the LinkGraph.
Definition at line 165 of file ELFLinkGraphBuilder.h.
Referenced by llvm::jitlink::createLinkGraphFromELFObject_aarch64(), llvm::jitlink::createLinkGraphFromELFObject_riscv(), and llvm::jitlink::createLinkGraphFromELFObject_x86_64().
|
inlineprotected |
Traverse all matching relocation records in the given section.
Convenience wrapper to allow passing a member function for the handler.
Definition at line 125 of file ELFLinkGraphBuilder.h.
|
protected |
Traverse all matching relocation records in the given section.
The handler function Func should be callable with this signature: Error(const typename ELFT::Rela &, const typename ELFT::Shdr &, Section &)
Definition at line 479 of file ELFLinkGraphBuilder.h.
Referenced by llvm::jitlink::ELFLinkGraphBuilder< object::ELF64LE >::forEachRelocation().
|
inlineprotected |
Definition at line 85 of file ELFLinkGraphBuilder.h.
|
inlineprotected |
Definition at line 97 of file ELFLinkGraphBuilder.h.
|
protected |
Definition at line 186 of file ELFLinkGraphBuilder.h.
|
protected |
Definition at line 273 of file ELFLinkGraphBuilder.h.
|
protected |
Definition at line 345 of file ELFLinkGraphBuilder.h.
|
inlineprotected |
Definition at line 76 of file ELFLinkGraphBuilder.h.
|
protected |
Definition at line 231 of file ELFLinkGraphBuilder.h.
|
inlineprotected |
Definition at line 80 of file ELFLinkGraphBuilder.h.
|
inlineprotected |
Definition at line 92 of file ELFLinkGraphBuilder.h.
|
protected |
Definition at line 144 of file ELFLinkGraphBuilder.h.
Referenced by llvm::jitlink::ELFLinkGraphBuilder< object::ELF64LE >::getGraphBlock(), and llvm::jitlink::ELFLinkGraphBuilder< object::ELF64LE >::setGraphBlock().
|
protected |
Definition at line 145 of file ELFLinkGraphBuilder.h.
Referenced by llvm::jitlink::ELFLinkGraphBuilder< object::ELF64LE >::getGraphSymbol(), and llvm::jitlink::ELFLinkGraphBuilder< object::ELF64LE >::setGraphSymbol().
|
protected |
Definition at line 136 of file ELFLinkGraphBuilder.h.
Referenced by llvm::jitlink::ELFLinkGraphBuilder< object::ELF64LE >::isRelocatable().
|
protected |
Definition at line 138 of file ELFLinkGraphBuilder.h.
|
protected |
Definition at line 140 of file ELFLinkGraphBuilder.h.
|
protected |
Definition at line 148 of file ELFLinkGraphBuilder.h.
|
protected |
Definition at line 139 of file ELFLinkGraphBuilder.h.