1 //===- Relocations.h -------------------------------------------*- C++ -*-===//
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLD_ELF_RELOCATIONS_H
11 #define LLD_ELF_RELOCATIONS_H
13 #include "lld/Core/LLVM.h"
18 template <class ELFT> class InputSection;
19 template <class ELFT> class InputSectionBase;
31 R_MIPS_GOT_LOCAL_PAGE,
47 R_RELAX_TLS_GD_TO_IE_END,
48 R_RELAX_TLS_GD_TO_IE_ABS,
49 R_RELAX_TLS_GD_TO_IE_PAGE_PC,
51 R_RELAX_TLS_GD_TO_LE_NEG,
67 template <class ELFT> struct Relocation {
70 InputSectionBase<ELFT> *InputSec;
76 template <class ELFT> void scanRelocations(InputSection<ELFT> &);
79 void scanRelocations(InputSectionBase<ELFT> &, const typename ELFT::Shdr &);
82 static inline typename ELFT::uint getAddend(const typename ELFT::Rel &Rel) {
87 static inline typename ELFT::uint getAddend(const typename ELFT::Rela &Rel) {