LLVM
15.0.0git
|
#include "ExecutionEngine/JITLink/MachOLinkGraphBuilder.h"
Classes | |
class | NormalizedSection |
struct | NormalizedSymbol |
Public Member Functions | |
virtual | ~MachOLinkGraphBuilder () |
Expected< std::unique_ptr< LinkGraph > > | buildGraph () |
Protected Types | |
using | SectionParserFunction = std::function< Error(NormalizedSection &S)> |
Protected Member Functions | |
MachOLinkGraphBuilder (const object::MachOObjectFile &Obj, Triple TT, LinkGraph::GetEdgeKindNameFunction GetEdgeKindName) | |
LinkGraph & | getGraph () const |
const object::MachOObjectFile & | getObject () const |
void | addCustomSectionParser (StringRef SectionName, SectionParserFunction Parse) |
virtual Error | addRelocations ()=0 |
template<typename... ArgTs> | |
NormalizedSymbol & | createNormalizedSymbol (ArgTs &&... Args) |
Create a symbol. More... | |
NormalizedSection & | getSectionByIndex (unsigned Index) |
Index is zero-based (MachO section indexes are usually one-based) and assumed to be in-range. More... | |
Expected< NormalizedSection & > | findSectionByIndex (unsigned Index) |
Try to get the section at the given index. More... | |
Expected< NormalizedSymbol & > | findSymbolByIndex (uint64_t Index) |
Try to get the symbol at the given index. More... | |
Symbol * | getSymbolByAddress (NormalizedSection &NSec, orc::ExecutorAddr Address) |
Returns the symbol with the highest address not greater than the search address, or null if no such symbol exists. More... | |
Expected< Symbol & > | findSymbolByAddress (NormalizedSection &NSec, orc::ExecutorAddr Address) |
Returns the symbol with the highest address not greater than the search address, or an error if no such symbol exists. More... | |
MachO::relocation_info | getRelocationInfo (const object::relocation_iterator RelItr) |
Static Protected Member Functions | |
static Linkage | getLinkage (uint16_t Desc) |
static Scope | getScope (StringRef Name, uint8_t Type) |
static bool | isAltEntry (const NormalizedSymbol &NSym) |
static bool | isDebugSection (const NormalizedSection &NSec) |
static bool | isZeroFillSection (const NormalizedSection &NSec) |
Definition at line 29 of file MachOLinkGraphBuilder.h.
|
protected |
Definition at line 83 of file MachOLinkGraphBuilder.h.
|
virtualdefault |
|
protected |
Definition at line 48 of file MachOLinkGraphBuilder.cpp.
References string.
|
protected |
Definition at line 56 of file MachOLinkGraphBuilder.cpp.
References assert(), llvm::StringMap< ValueTy, AllocatorTy >::count(), move, and llvm::AMDGPU::ElfNote::SectionName.
|
protectedpure virtual |
Definition at line 24 of file MachOLinkGraphBuilder.cpp.
References llvm::object::MachOObjectFile::isRelocatableObject().
|
inlineprotected |
Create a symbol.
Definition at line 99 of file MachOLinkGraphBuilder.h.
References Allocator, and llvm::AMDGPU::HSAMD::Kernel::Key::Args.
|
inlineprotected |
Try to get the section at the given index.
Will return an error if the given index is out of range, or if no section has been added for the given index.
Definition at line 117 of file MachOLinkGraphBuilder.h.
References llvm::formatv(), I, and Index.
|
inlineprotected |
Returns the symbol with the highest address not greater than the search address, or an error if no such symbol exists.
Definition at line 149 of file MachOLinkGraphBuilder.h.
References llvm::formatv(), and getSymbolByAddress().
|
inlineprotected |
Try to get the symbol at the given index.
Will return an error if the given index is out of range, or if no symbol has been added for the given index.
Definition at line 128 of file MachOLinkGraphBuilder.h.
References assert(), llvm::formatv(), I, and Index.
|
inlineprotected |
Definition at line 88 of file MachOLinkGraphBuilder.h.
References G.
Definition at line 63 of file MachOLinkGraphBuilder.cpp.
References llvm::MachO::N_WEAK_DEF, llvm::MachO::N_WEAK_REF, llvm::jitlink::Strong, and llvm::jitlink::Weak.
|
inlineprotected |
Definition at line 90 of file MachOLinkGraphBuilder.h.
Referenced by getRelocationInfo().
|
inlineprotected |
Definition at line 167 of file MachOLinkGraphBuilder.h.
References getObject(), llvm::object::MachOObjectFile::getRelocation(), llvm::MachO::relocation_info::r_address, llvm::MachO::relocation_info::r_extern, llvm::MachO::relocation_info::r_length, llvm::MachO::relocation_info::r_pcrel, llvm::MachO::relocation_info::r_symbolnum, llvm::MachO::relocation_info::r_type, llvm::MachO::any_relocation_info::r_word0, and llvm::MachO::any_relocation_info::r_word1.
|
staticprotected |
Definition at line 69 of file MachOLinkGraphBuilder.cpp.
References llvm::jitlink::Default, llvm::jitlink::Hidden, llvm::jitlink::Local, llvm::MachO::N_EXT, and llvm::MachO::N_PEXT.
|
inlineprotected |
|
inlineprotected |
Returns the symbol with the highest address not greater than the search address, or null if no such symbol exists.
Definition at line 139 of file MachOLinkGraphBuilder.h.
References llvm::jitlink::MachOLinkGraphBuilder::NormalizedSection::CanonicalSymbols, and I.
Referenced by findSymbolByAddress().
|
staticprotected |
Definition at line 79 of file MachOLinkGraphBuilder.cpp.
References llvm::jitlink::MachOLinkGraphBuilder::NormalizedSymbol::Desc, and llvm::MachO::N_ALT_ENTRY.
|
staticprotected |
Definition at line 83 of file MachOLinkGraphBuilder.cpp.
References llvm::jitlink::MachOLinkGraphBuilder::NormalizedSection::Flags, llvm::MachO::S_ATTR_DEBUG, and llvm::jitlink::MachOLinkGraphBuilder::NormalizedSection::SegName.
|
staticprotected |
Definition at line 88 of file MachOLinkGraphBuilder.cpp.
References llvm::jitlink::MachOLinkGraphBuilder::NormalizedSection::Flags, llvm::MachO::S_GB_ZEROFILL, llvm::MachO::S_THREAD_LOCAL_ZEROFILL, llvm::MachO::S_ZEROFILL, and llvm::MachO::SECTION_TYPE.