llvm/lld/ELF/Arch/PPC.cpp

//===- PPC.cpp ------------------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//

#include "OutputSections.h"
#include "Symbols.h"
#include "SyntheticSections.h"
#include "Target.h"
#include "Thunks.h"
#include "lld/Common/ErrorHandler.h"
#include "llvm/Support/Endian.h"

usingnamespacellvm;
usingnamespacellvm::support::endian;
usingnamespacellvm::ELF;
usingnamespacelld;
usingnamespacelld::elf;

// Undefine the macro predefined by GCC powerpc32.
#undef PPC

namespace {
class PPC final : public TargetInfo {};
} // namespace

static uint16_t lo(uint32_t v) {}
static uint16_t ha(uint32_t v) {}

static uint32_t readFromHalf16(const uint8_t *loc) {}

static void writeFromHalf16(uint8_t *loc, uint32_t insn) {}

void elf::writePPC32GlinkSection(uint8_t *buf, size_t numEntries) {}

PPC::PPC() {}

void PPC::writeIplt(uint8_t *buf, const Symbol &sym,
                    uint64_t /*pltEntryAddr*/) const {}

void PPC::writeGotHeader(uint8_t *buf) const {}

void PPC::writeGotPlt(uint8_t *buf, const Symbol &s) const {}

bool PPC::needsThunk(RelExpr expr, RelType type, const InputFile *file,
                     uint64_t branchAddr, const Symbol &s, int64_t a) const {}

uint32_t PPC::getThunkSectionSpacing() const {}

bool PPC::inBranchRange(RelType type, uint64_t src, uint64_t dst) const {}

RelExpr PPC::getRelExpr(RelType type, const Symbol &s,
                        const uint8_t *loc) const {}

RelType PPC::getDynRel(RelType type) const {}

int64_t PPC::getImplicitAddend(const uint8_t *buf, RelType type) const {}

static std::pair<RelType, uint64_t> fromDTPREL(RelType type, uint64_t val) {}

void PPC::relocate(uint8_t *loc, const Relocation &rel, uint64_t val) const {}

RelExpr PPC::adjustTlsExpr(RelType type, RelExpr expr) const {}

int PPC::getTlsGdRelaxSkip(RelType type) const {}

void PPC::relaxTlsGdToIe(uint8_t *loc, const Relocation &rel,
                         uint64_t val) const {}

void PPC::relaxTlsGdToLe(uint8_t *loc, const Relocation &rel,
                         uint64_t val) const {}

void PPC::relaxTlsLdToLe(uint8_t *loc, const Relocation &rel,
                         uint64_t val) const {}

void PPC::relaxTlsIeToLe(uint8_t *loc, const Relocation &rel,
                         uint64_t val) const {}

void PPC::relocateAlloc(InputSectionBase &sec, uint8_t *buf) const {}

TargetInfo *elf::getPPCTargetInfo() {}