#ifndef LLD_ELF_RELOCATIONS_H
#define LLD_ELF_RELOCATIONS_H
#include "lld/Common/LLVM.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Object/ELFTypes.h"
#include <vector>
namespace lld::elf {
struct Ctx;
class Defined;
class Symbol;
class InputSection;
class InputSectionBase;
class OutputSection;
class SectionBase;
RelType;
JumpModType;
enum RelExpr { … };
struct Relocation { … };
struct JumpInstrMod { … };
template <class ELFT> void scanRelocations(Ctx &ctx);
template <class ELFT> void checkNoCrossRefs(Ctx &ctx);
void reportUndefinedSymbols(Ctx &);
void postScanRelocations(Ctx &ctx);
void addGotEntry(Ctx &ctx, Symbol &sym);
void hexagonTLSSymbolUpdate(Ctx &ctx);
bool hexagonNeedsTLSSymbol(ArrayRef<OutputSection *> outputSections);
class ThunkSection;
class Thunk;
class InputSectionDescription;
class ThunkCreator { … };
inline uint64_t readLEB128(const uint8_t *&p, uint64_t leb) { … }
inline uint64_t readULEB128(const uint8_t *&p) { … }
inline int64_t readSLEB128(const uint8_t *&p) { … }
template <bool is64> struct RelocsCrel { … };
template <class RelTy> struct Relocs : ArrayRef<RelTy> { … };
Relocs<llvm::object::Elf_Crel_Impl<is64>>;
template <class ELFT>
static inline int64_t getAddend(const typename ELFT::Rel &rel) { … }
template <class ELFT>
static inline int64_t getAddend(const typename ELFT::Rela &rel) { … }
template <class ELFT>
static inline int64_t getAddend(const typename ELFT::Crel &rel) { … }
template <typename RelTy>
inline Relocs<RelTy> sortRels(Relocs<RelTy> rels,
SmallVector<RelTy, 0> &storage) { … }
template <bool is64>
inline Relocs<llvm::object::Elf_Crel_Impl<is64>>
sortRels(Relocs<llvm::object::Elf_Crel_Impl<is64>> rels,
SmallVector<llvm::object::Elf_Crel_Impl<is64>, 0> &storage) { … }
bool needsGot(RelExpr expr);
}
#endif