ELFDynObjReader.h revision a790f0a8f3175183bea088389b3e4ae41813e192
1//===- ELFDynObjReader.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 MCLD_LD_ELFDYNOBJREADER_H 10#define MCLD_LD_ELFDYNOBJREADER_H 11#include <mcld/LD/DynObjReader.h> 12 13namespace mcld { 14 15class Input; 16class LinkerConfig; 17class IRBuilder; 18class GNULDBackend; 19class ELFReaderIF; 20 21/** \class ELFDynObjReader 22 * \brief ELFDynObjReader reads ELF dynamic shared objects. 23 * 24 */ 25class ELFDynObjReader : public DynObjReader 26{ 27public: 28 ELFDynObjReader(GNULDBackend& pBackend, 29 IRBuilder& pBuilder, 30 const LinkerConfig& pConfig); 31 ~ELFDynObjReader(); 32 33 // ----- observers ----- // 34 bool isMyFormat(Input &pFile, bool &pContinue) const; 35 36 // ----- readers ----- // 37 bool readHeader(Input& pFile); 38 39 bool readSymbols(Input& pInput); 40 41private: 42 ELFReaderIF *m_pELFReader; 43 IRBuilder& m_Builder; 44}; 45 46} // namespace of mcld 47 48#endif 49 50