#include "llvm/ExecutionEngine/JITLink/ELF_ppc64.h"
#include "llvm/ExecutionEngine/JITLink/DWARFRecordSectionSplitter.h"
#include "llvm/ExecutionEngine/JITLink/TableManager.h"
#include "llvm/ExecutionEngine/JITLink/ppc64.h"
#include "llvm/Object/ELFObjectFile.h"
#include "EHFrameSupportImpl.h"
#include "ELFLinkGraphBuilder.h"
#include "JITLinkGeneric.h"
#define DEBUG_TYPE …
namespace {
usingnamespacellvm;
usingnamespacellvm::jitlink;
constexpr StringRef ELFTOCSymbolName = …;
constexpr StringRef TOCSymbolAliasIdent = …;
constexpr uint64_t ELFTOCBaseOffset = …;
constexpr StringRef ELFTLSInfoSectionName = …;
template <llvm::endianness Endianness>
class TLSInfoTableManager_ELF_ppc64
: public TableManager<TLSInfoTableManager_ELF_ppc64<Endianness>> { … };
template <>
const uint8_t TLSInfoTableManager_ELF_ppc64<
llvm::endianness::little>::TLSInfoEntryContent[16] = …;
template <>
const uint8_t TLSInfoTableManager_ELF_ppc64<
llvm::endianness::big>::TLSInfoEntryContent[16] = …;
template <llvm::endianness Endianness>
Symbol &createELFGOTHeader(LinkGraph &G,
ppc64::TOCTableManager<Endianness> &TOC) { … }
template <llvm::endianness Endianness>
inline void
registerExistingGOTEntries(LinkGraph &G,
ppc64::TOCTableManager<Endianness> &TOC) { … }
template <llvm::endianness Endianness>
Error buildTables_ELF_ppc64(LinkGraph &G) { … }
}
namespace llvm::jitlink {
template <llvm::endianness Endianness>
class ELFLinkGraphBuilder_ppc64
: public ELFLinkGraphBuilder<object::ELFType<Endianness, true>> { … };
template <llvm::endianness Endianness>
class ELFJITLinker_ppc64 : public JITLinker<ELFJITLinker_ppc64<Endianness>> { … };
template <llvm::endianness Endianness>
Expected<std::unique_ptr<LinkGraph>>
createLinkGraphFromELFObject_ppc64(MemoryBufferRef ObjectBuffer) { … }
template <llvm::endianness Endianness>
void link_ELF_ppc64(std::unique_ptr<LinkGraph> G,
std::unique_ptr<JITLinkContext> Ctx) { … }
Expected<std::unique_ptr<LinkGraph>>
createLinkGraphFromELFObject_ppc64(MemoryBufferRef ObjectBuffer) { … }
Expected<std::unique_ptr<LinkGraph>>
createLinkGraphFromELFObject_ppc64le(MemoryBufferRef ObjectBuffer) { … }
void link_ELF_ppc64(std::unique_ptr<LinkGraph> G,
std::unique_ptr<JITLinkContext> Ctx) { … }
void link_ELF_ppc64le(std::unique_ptr<LinkGraph> G,
std::unique_ptr<JITLinkContext> Ctx) { … }
}