llvm/llvm/lib/ExecutionEngine/JITLink/ELF_ppc64.cpp

//===------- ELF_ppc64.cpp -JIT linker implementation for ELF/ppc64 -------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// ELF/ppc64 jit-link implementation.
//
//===----------------------------------------------------------------------===//

#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) {}

// Register preexisting GOT entries with TOC table manager.
template <llvm::endianness Endianness>
inline void
registerExistingGOTEntries(LinkGraph &G,
                           ppc64::TOCTableManager<Endianness> &TOC) {}

template <llvm::endianness Endianness>
Error buildTables_ELF_ppc64(LinkGraph &G) {}

} // namespace

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) {}

/// jit-link the given object buffer, which must be a ELF ppc64 object file.
void link_ELF_ppc64(std::unique_ptr<LinkGraph> G,
                    std::unique_ptr<JITLinkContext> Ctx) {}

/// jit-link the given object buffer, which must be a ELF ppc64le object file.
void link_ELF_ppc64le(std::unique_ptr<LinkGraph> G,
                      std::unique_ptr<JITLinkContext> Ctx) {}

} // end namespace llvm::jitlink