#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;
#undef PPC
namespace {
class PPC final : public TargetInfo { … };
}
static uint16_t lo(uint32_t v) { … }
static uint16_t ha(uint32_t v) { … }
static uint32_t readFromHalf16(Ctx &ctx, const uint8_t *loc) { … }
static void writeFromHalf16(Ctx &ctx, uint8_t *loc, uint32_t insn) { … }
void elf::writePPC32GlinkSection(Ctx &ctx, uint8_t *buf, size_t numEntries) { … }
PPC::PPC(Ctx &ctx) : … { … }
void PPC::writeIplt(uint8_t *buf, const Symbol &sym,
uint64_t ) 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 { … }
void elf::setPPCTargetInfo(Ctx &ctx) { … }