summaryrefslogtreecommitdiffstats
path: root/lld/ELF/InputSection.h
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/InputSection.h')
-rw-r--r--lld/ELF/InputSection.h49
1 files changed, 1 insertions, 48 deletions
diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h
index f7d7b52954f..028c3be8ae9 100644
--- a/lld/ELF/InputSection.h
+++ b/lld/ELF/InputSection.h
@@ -11,6 +11,7 @@
#define LLD_ELF_INPUT_SECTION_H
#include "Config.h"
+#include "Relocations.h"
#include "lld/Core/LLVM.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/TinyPtrVector.h"
@@ -27,54 +28,6 @@ template <class ELFT> class ObjectFile;
template <class ELFT> class OutputSection;
template <class ELFT> class OutputSectionBase;
-enum RelExpr {
- R_ABS,
- R_GOT,
- R_GOTONLY_PC,
- R_GOTREL,
- R_GOT_FROM_END,
- R_GOT_OFF,
- R_GOT_PAGE_PC,
- R_GOT_PC,
- R_HINT,
- R_MIPS_GOT_LOCAL,
- R_MIPS_GOT_LOCAL_PAGE,
- R_NEG_TLS,
- R_PAGE_PC,
- R_PC,
- R_PLT,
- R_PLT_PC,
- R_PPC_OPD,
- R_PPC_PLT_OPD,
- R_PPC_TOC,
- R_RELAX_TLS_GD_TO_IE,
- R_RELAX_TLS_GD_TO_LE,
- R_RELAX_TLS_IE_TO_LE,
- R_RELAX_TLS_LD_TO_LE,
- R_SIZE,
- R_THUNK,
- R_TLS,
- R_TLSGD,
- R_TLSGD_PC,
- R_TLSLD,
- R_TLSLD_PC
-};
-
-inline bool refersToGotEntry(RelExpr Expr) {
- return Expr == R_GOT || Expr == R_GOT_OFF || Expr == R_MIPS_GOT_LOCAL ||
- Expr == R_MIPS_GOT_LOCAL_PAGE || Expr == R_GOT_PAGE_PC ||
- Expr == R_GOT_PC || Expr == R_GOT_FROM_END || Expr == R_TLSGD ||
- Expr == R_TLSGD_PC;
-}
-
-struct Relocation {
- RelExpr Expr;
- uint32_t Type;
- uint64_t Offset;
- uint64_t Addend;
- SymbolBody *Sym;
-};
-
// This corresponds to a section of an input file.
template <class ELFT> class InputSectionBase {
protected:
OpenPOWER on IntegriCloud