#include "InputFiles.h"
#include "OutputSections.h"
#include "Symbols.h"
#include "SyntheticSections.h"
#include "Target.h"
#include "lld/Common/ErrorHandler.h"
#include "llvm/BinaryFormat/ELF.h"
usingnamespacellvm;
usingnamespacellvm::object;
usingnamespacellvm::ELF;
usingnamespacelld;
usingnamespacelld::elf;
namespace {
template <class ELFT> class MIPS final : public TargetInfo { … };
}
template <class ELFT> MIPS<ELFT>::MIPS() { … }
template <class ELFT> uint32_t MIPS<ELFT>::calcEFlags() const { … }
template <class ELFT>
RelExpr MIPS<ELFT>::getRelExpr(RelType type, const Symbol &s,
const uint8_t *loc) const { … }
template <class ELFT> RelType MIPS<ELFT>::getDynRel(RelType type) const { … }
template <class ELFT>
void MIPS<ELFT>::writeGotPlt(uint8_t *buf, const Symbol &) const { … }
template <endianness E> static uint32_t readShuffle(const uint8_t *loc) { … }
static void writeValue(uint8_t *loc, uint64_t v, uint8_t bitsSize,
uint8_t shift) { … }
template <endianness E>
static void writeShuffleValue(uint8_t *loc, uint64_t v, uint8_t bitsSize,
uint8_t shift) { … }
template <endianness E>
static void writeMicroRelocation16(uint8_t *loc, uint64_t v, uint8_t bitsSize,
uint8_t shift) { … }
template <class ELFT> void MIPS<ELFT>::writePltHeader(uint8_t *buf) const { … }
template <class ELFT>
void MIPS<ELFT>::writePlt(uint8_t *buf, const Symbol &sym,
uint64_t pltEntryAddr) const { … }
template <class ELFT>
bool MIPS<ELFT>::needsThunk(RelExpr expr, RelType type, const InputFile *file,
uint64_t branchAddr, const Symbol &s,
int64_t ) const { … }
template <class ELFT>
int64_t MIPS<ELFT>::getImplicitAddend(const uint8_t *buf, RelType type) const { … }
static std::pair<uint32_t, uint64_t>
calculateMipsRelChain(uint8_t *loc, RelType type, uint64_t val) { … }
static bool isBranchReloc(RelType type) { … }
static bool isMicroBranchReloc(RelType type) { … }
template <class ELFT>
static uint64_t fixupCrossModeJump(uint8_t *loc, RelType type, uint64_t val) { … }
template <class ELFT>
void MIPS<ELFT>::relocate(uint8_t *loc, const Relocation &rel,
uint64_t val) const { … }
template <class ELFT> bool MIPS<ELFT>::usesOnlyLowPageBits(RelType type) const { … }
template <class ELFT> bool elf::isMipsPIC(const Defined *sym) { … }
template <class ELFT> TargetInfo *elf::getMipsTargetInfo() { … }
template TargetInfo *elf::getMipsTargetInfo<ELF32LE>();
template TargetInfo *elf::getMipsTargetInfo<ELF32BE>();
template TargetInfo *elf::getMipsTargetInfo<ELF64LE>();
template TargetInfo *elf::getMipsTargetInfo<ELF64BE>();
template bool elf::isMipsPIC<ELF32LE>(const Defined *);
template bool elf::isMipsPIC<ELF32BE>(const Defined *);
template bool elf::isMipsPIC<ELF64LE>(const Defined *);
template bool elf::isMipsPIC<ELF64BE>(const Defined *);