llvm/lld/ELF/Target.cpp

//===- Target.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
//
//===----------------------------------------------------------------------===//
//
// Machine-specific things, such as applying relocations, creation of
// GOT or PLT entries, etc., are handled in this file.
//
// Refer the ELF spec for the single letter variables, S, A or P, used
// in this file.
//
// Some functions defined in this file has "relaxTls" as part of their names.
// They do peephole optimization for TLS variables by rewriting instructions.
// They are not part of the ABI but optional optimization, so you can skip
// them if you are not interested in how TLS variables are optimized.
// See the following paper for the details.
//
//   Ulrich Drepper, ELF Handling For Thread-Local Storage
//   http://www.akkadia.org/drepper/tls.pdf
//
//===----------------------------------------------------------------------===//

#include "Target.h"
#include "InputFiles.h"
#include "OutputSections.h"
#include "SymbolTable.h"
#include "Symbols.h"
#include "SyntheticSections.h"
#include "lld/Common/ErrorHandler.h"
#include "llvm/Object/ELF.h"

usingnamespacellvm;
usingnamespacellvm::object;
usingnamespacellvm::ELF;
usingnamespacelld;
usingnamespacelld::elf;

std::string lld::toString(RelType type) {}

void elf::setTarget(Ctx &ctx) {}

ErrorPlace elf::getErrorPlace(Ctx &ctx, const uint8_t *loc) {}

TargetInfo::~TargetInfo() {}

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

bool TargetInfo::usesOnlyLowPageBits(RelType type) const {}

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

bool TargetInfo::adjustPrologueForCrossSplitStack(uint8_t *loc, uint8_t *end,
                                                  uint8_t stOther) const {}

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

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

RelExpr TargetInfo::adjustGotPcExpr(RelType type, int64_t addend,
                                    const uint8_t *data) const {}

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

uint64_t TargetInfo::getImageBase() const {}