From 4ea16835ba66f2240d050ffcaee44cee6c97cab9 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:45 +0000 Subject: Vendor import of lld trunk r306325: https://llvm.org/svn/llvm-project/lld/trunk@306325 --- ELF/Arch/PPC.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ELF/Arch/PPC.cpp') diff --git a/ELF/Arch/PPC.cpp b/ELF/Arch/PPC.cpp index b5f0d5b4c687..19e10729a00e 100644 --- a/ELF/Arch/PPC.cpp +++ b/ELF/Arch/PPC.cpp @@ -8,7 +8,6 @@ //===----------------------------------------------------------------------===// #include "Error.h" -#include "Memory.h" #include "Symbols.h" #include "Target.h" #include "llvm/Support/Endian.h" @@ -22,7 +21,7 @@ using namespace lld::elf; namespace { class PPC final : public TargetInfo { public: - PPC() {} + PPC() { GotBaseSymOff = 0x8000; } void relocateOne(uint8_t *Loc, uint32_t Type, uint64_t Val) const override; RelExpr getRelExpr(uint32_t Type, const SymbolBody &S, const uint8_t *Loc) const override; @@ -60,4 +59,7 @@ RelExpr PPC::getRelExpr(uint32_t Type, const SymbolBody &S, } } -TargetInfo *elf::createPPCTargetInfo() { return make(); } +TargetInfo *elf::getPPCTargetInfo() { + static PPC Target; + return &Target; +} -- cgit v1.3