summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86LDBackend.h
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2014-11-26 18:48:20 -0800
committerStephen Hines <srhines@google.com>2014-11-26 18:49:58 -0800
commit37b74a387bb3993387029859c2d9d051c41c724e (patch)
treea2a5b611b47a82624fe31dc457d12533a3aaaed6 /lib/Target/X86/X86LDBackend.h
parentdfd6c08c66b4b3d58fd28b5376478381e1a5647a (diff)
downloadmclinker-37b74a387bb3993387029859c2d9d051c41c724e.tar.gz
Update mclinker for LLVM rebase to r222494.
This corresponds to the following upstream mclinker change: commit b2f1691276052c4215abf36715d43248d6337cf8 Author: Diana Chen <mysekki@gmail.com> Date: Tue Nov 25 14:03:29 2014 +0800 option: Allow `-hash-style' can be specified zero or more times Change-Id: I332546680bb45cf9692adfa2c2d3dcdc84361afc
Diffstat (limited to 'lib/Target/X86/X86LDBackend.h')
-rw-r--r--lib/Target/X86/X86LDBackend.h61
1 files changed, 28 insertions, 33 deletions
diff --git a/lib/Target/X86/X86LDBackend.h b/lib/Target/X86/X86LDBackend.h
index 503fca9..411ff51 100644
--- a/lib/Target/X86/X86LDBackend.h
+++ b/lib/Target/X86/X86LDBackend.h
@@ -6,16 +6,17 @@
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
-#ifndef TARGET_X86_X86LDBACKEND_H
-#define TARGET_X86_X86LDBACKEND_H
+#ifndef TARGET_X86_X86LDBACKEND_H_
+#define TARGET_X86_X86LDBACKEND_H_
#include "X86ELFDynamic.h"
#include "X86GOT.h"
#include "X86GOTPLT.h"
#include "X86PLT.h"
-#include <mcld/LD/LDSection.h>
-#include <mcld/Target/GNULDBackend.h>
-#include <mcld/Target/OutputRelocSection.h>
+
+#include "mcld/LD/LDSection.h"
+#include "mcld/Target/GNULDBackend.h"
+#include "mcld/Target/OutputRelocSection.h"
namespace mcld {
@@ -25,9 +26,8 @@ class GNUInfo;
//===----------------------------------------------------------------------===//
/// X86GNULDBackend - linker backend of X86 target of GNU ELF format
///
-class X86GNULDBackend : public GNULDBackend
-{
-public:
+class X86GNULDBackend : public GNULDBackend {
+ public:
X86GNULDBackend(const LinkerConfig& pConfig,
GNUInfo* pInfo,
Relocation::Type pCopyRel);
@@ -99,24 +99,21 @@ public:
bool finalizeTargetSymbols();
/// getPointerRel - get pointer relocation type.
- Relocation::Type getPointerRel()
- { return m_PointerRel; }
+ Relocation::Type getPointerRel() { return m_PointerRel; }
- Relocation::Type getCopyRelType() const { return m_CopyRel; }
+ Relocation::Type getCopyRelType() const { return m_CopyRel; }
Relocation::Type getPointerRelType() const { return m_PointerRel; }
-protected:
+ protected:
void defineGOTSymbol(IRBuilder& pBuilder, Fragment&);
/// getRelEntrySize - the size in BYTE of rel type relocation
- size_t getRelEntrySize()
- { return m_RelEntrySize; }
+ size_t getRelEntrySize() { return m_RelEntrySize; }
/// getRelEntrySize - the size in BYTE of rela type relocation
- size_t getRelaEntrySize()
- { return m_RelaEntrySize; }
+ size_t getRelaEntrySize() { return m_RelaEntrySize; }
-private:
+ private:
/// doCreateProgramHdrs - backend can implement this function to create the
/// target-dependent segments
void doCreateProgramHdrs(Module& pModule);
@@ -125,9 +122,9 @@ private:
virtual uint64_t emitGOTSectionData(MemoryRegion& pRegion) const = 0;
- virtual uint64_t
- emitGOTPLTSectionData(MemoryRegion& pRegion,
- const ELFFileFormat* FileFormat) const = 0;
+ virtual uint64_t emitGOTPLTSectionData(
+ MemoryRegion& pRegion,
+ const ELFFileFormat* FileFormat) const = 0;
virtual void setRelDynSize() = 0;
virtual void setRelPLTSize() = 0;
@@ -136,7 +133,7 @@ private:
virtual llvm::StringRef createCIERegionForPLT() = 0;
virtual llvm::StringRef createFDERegionForPLT() = 0;
-protected:
+ protected:
Relocator* m_pRelocator;
X86PLT* m_pPLT;
/// m_RelDyn - dynamic relocation table of .rel.dyn
@@ -158,9 +155,8 @@ protected:
//===----------------------------------------------------------------------===//
/// X86_32GNULDBackend - linker backend of X86-32 target of GNU ELF format
///
-class X86_32GNULDBackend : public X86GNULDBackend
-{
-public:
+class X86_32GNULDBackend : public X86GNULDBackend {
+ public:
X86_32GNULDBackend(const LinkerConfig& pConfig, GNUInfo* pInfo);
~X86_32GNULDBackend();
@@ -175,7 +171,7 @@ public:
const X86_32GOTPLT& getGOTPLT() const;
-private:
+ private:
/// initRelocator - create and initialize Relocator.
bool initRelocator();
@@ -192,7 +188,7 @@ private:
llvm::StringRef createCIERegionForPLT();
llvm::StringRef createFDERegionForPLT();
-private:
+ private:
X86_32GOT* m_pGOT;
X86_32GOTPLT* m_pGOTPLT;
};
@@ -201,9 +197,8 @@ private:
//===----------------------------------------------------------------------===//
/// X86_64GNULDBackend - linker backend of X86-64 target of GNU ELF format
///
-class X86_64GNULDBackend : public X86GNULDBackend
-{
-public:
+class X86_64GNULDBackend : public X86GNULDBackend {
+ public:
X86_64GNULDBackend(const LinkerConfig& pConfig, GNUInfo* pInfo);
~X86_64GNULDBackend();
@@ -218,7 +213,7 @@ public:
const X86_64GOTPLT& getGOTPLT() const;
-private:
+ private:
/// initRelocator - create and initialize Relocator.
bool initRelocator();
@@ -235,11 +230,11 @@ private:
llvm::StringRef createCIERegionForPLT();
llvm::StringRef createFDERegionForPLT();
-private:
+ private:
X86_64GOT* m_pGOT;
X86_64GOTPLT* m_pGOTPLT;
};
-} // namespace of mcld
-#endif
+} // namespace mcld
+#endif // TARGET_X86_X86LDBACKEND_H_