#include "llvm/Object/RelocationResolver.h"
#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/COFF.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/BinaryFormat/Wasm.h"
#include "llvm/Object/ELFObjectFile.h"
#include "llvm/Object/ELFTypes.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Object/SymbolicFile.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/TargetParser/Triple.h"
#include <cassert>
namespace llvm {
namespace object {
static int64_t getELFAddend(RelocationRef R) { … }
static bool supportsX86_64(uint64_t Type) { … }
static uint64_t resolveX86_64(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t LocData, int64_t Addend) { … }
static bool supportsAArch64(uint64_t Type) { … }
static uint64_t resolveAArch64(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t , int64_t Addend) { … }
static bool supportsBPF(uint64_t Type) { … }
static uint64_t resolveBPF(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t LocData, int64_t ) { … }
static bool supportsMips64(uint64_t Type) { … }
static uint64_t resolveMips64(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t , int64_t Addend) { … }
static bool supportsMSP430(uint64_t Type) { … }
static uint64_t resolveMSP430(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t , int64_t Addend) { … }
static bool supportsPPC64(uint64_t Type) { … }
static uint64_t resolvePPC64(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t , int64_t Addend) { … }
static bool supportsSystemZ(uint64_t Type) { … }
static uint64_t resolveSystemZ(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t , int64_t Addend) { … }
static bool supportsSparc64(uint64_t Type) { … }
static uint64_t resolveSparc64(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t , int64_t Addend) { … }
static bool isAMDGPU(const ObjectFile &Obj) { … }
static bool supportsAmdgpu(uint64_t Type) { … }
static uint64_t resolveAmdgpu(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t , int64_t Addend) { … }
static bool supportsX86(uint64_t Type) { … }
static uint64_t resolveX86(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t LocData, int64_t ) { … }
static bool supportsPPC32(uint64_t Type) { … }
static uint64_t resolvePPC32(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t , int64_t Addend) { … }
static bool supportsARM(uint64_t Type) { … }
static uint64_t resolveARM(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t LocData, int64_t Addend) { … }
static bool supportsAVR(uint64_t Type) { … }
static uint64_t resolveAVR(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t , int64_t Addend) { … }
static bool supportsLanai(uint64_t Type) { … }
static uint64_t resolveLanai(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t , int64_t Addend) { … }
static bool supportsMips32(uint64_t Type) { … }
static uint64_t resolveMips32(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t LocData, int64_t ) { … }
static bool supportsSparc32(uint64_t Type) { … }
static uint64_t resolveSparc32(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t LocData, int64_t Addend) { … }
static bool supportsHexagon(uint64_t Type) { … }
static uint64_t resolveHexagon(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t , int64_t Addend) { … }
static bool supportsRISCV(uint64_t Type) { … }
static uint64_t resolveRISCV(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t LocData, int64_t Addend) { … }
static bool supportsCSKY(uint64_t Type) { … }
static uint64_t resolveCSKY(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t LocData, int64_t Addend) { … }
static bool supportsLoongArch(uint64_t Type) { … }
static uint64_t resolveLoongArch(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t LocData, int64_t Addend) { … }
static bool supportsCOFFX86(uint64_t Type) { … }
static uint64_t resolveCOFFX86(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t LocData, int64_t ) { … }
static bool supportsCOFFX86_64(uint64_t Type) { … }
static uint64_t resolveCOFFX86_64(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t LocData, int64_t ) { … }
static bool supportsCOFFARM(uint64_t Type) { … }
static uint64_t resolveCOFFARM(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t LocData, int64_t ) { … }
static bool supportsCOFFARM64(uint64_t Type) { … }
static uint64_t resolveCOFFARM64(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t LocData, int64_t ) { … }
static bool supportsMachOX86_64(uint64_t Type) { … }
static uint64_t resolveMachOX86_64(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t LocData, int64_t ) { … }
static bool supportsWasm32(uint64_t Type) { … }
static bool supportsWasm64(uint64_t Type) { … }
static uint64_t resolveWasm32(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t LocData, int64_t ) { … }
static uint64_t resolveWasm64(uint64_t Type, uint64_t Offset, uint64_t S,
uint64_t LocData, int64_t Addend) { … }
std::pair<SupportsRelocation, RelocationResolver>
getRelocationResolver(const ObjectFile &Obj) { … }
uint64_t resolveRelocation(RelocationResolver Resolver, const RelocationRef &R,
uint64_t S, uint64_t LocData) { … }
}
}