summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/OutputSections.cpp2
-rw-r--r--lld/ELF/OutputSections.h4
-rw-r--r--lld/ELF/Writer.cpp4
3 files changed, 4 insertions, 6 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index f6f5d96d974..938e63ae544 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -23,8 +23,6 @@ using namespace llvm::ELF;
using namespace lld;
using namespace lld::elf2;
-bool elf2::HasGotOffRel = false;
-
template <class ELFT>
OutputSectionBase<ELFT>::OutputSectionBase(StringRef Name, uint32_t Type,
uintX_t Flags)
diff --git a/lld/ELF/OutputSections.h b/lld/ELF/OutputSections.h
index 2af5a480446..0deb00f74ac 100644
--- a/lld/ELF/OutputSections.h
+++ b/lld/ELF/OutputSections.h
@@ -36,10 +36,6 @@ template <class ELFT> class OutputSection;
template <class ELFT> class ObjectFile;
template <class ELFT> class DefinedRegular;
-// Flag to force GOT to be in output if we have relocations
-// that relies on its address.
-extern bool HasGotOffRel;
-
template <class ELFT>
static inline typename llvm::object::ELFFile<ELFT>::uintX_t
getAddend(const typename llvm::object::ELFFile<ELFT>::Elf_Rel &Rel) {
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 6828b11cf74..622ca047e5a 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -95,6 +95,10 @@ private:
uintX_t SectionHeaderOff;
llvm::StringMap<llvm::StringRef> InputToOutputSection;
+
+ // Flag to force GOT to be in output if we have relocations
+ // that relies on its address.
+ bool HasGotOffRel = false;
};
} // anonymous namespace
OpenPOWER on IntegriCloud