1//===- ARMRelocationFactory.h --------------------------------------------===// 2// 3// The MCLinker Project 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9#ifndef ARM_RELOCATION_FACTORY_H 10#define ARM_RELOCATION_FACTORY_H 11#ifdef ENABLE_UNITTEST 12#include <gtest.h> 13#endif 14 15#include <mcld/LD/RelocationFactory.h> 16#include <mcld/Target/GOT.h> 17#include "ARMLDBackend.h" 18 19namespace mcld 20{ 21 22/** \class ARMRelocationFactory 23 * \brief ARMRelocationFactory creates and destroys the ARM relocations. 24 * 25 */ 26class ARMRelocationFactory : public RelocationFactory 27{ 28public: 29 ARMRelocationFactory(size_t pNum, ARMGNULDBackend& pParent); 30 ~ARMRelocationFactory(); 31 32 Result applyRelocation(Relocation& pRelocation, const MCLDInfo& pLDInfo); 33 34 ARMGNULDBackend& getTarget() 35 { return m_Target; } 36 37 const ARMGNULDBackend& getTarget() const 38 { return m_Target; } 39 40 const char* getName(Relocation::Type pType) const; 41 42private: 43 ARMGNULDBackend& m_Target; 44}; 45 46} // namespace of mcld 47 48#endif 49 50