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 13 namespace mcld { 14 15 class Input; 16 class LinkerConfig; 17 class IRBuilder; 18 class GNULDBackend; 19 class ELFReaderIF; 20 21 /** \class ELFDynObjReader 22 * \brief ELFDynObjReader reads ELF dynamic shared objects. 23 * 24 */ 25 class ELFDynObjReader : public DynObjReader 26 { 27 public: 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 41 private: 42 ELFReaderIF *m_pELFReader; 43 IRBuilder& m_Builder; 44 }; 45 46 } // namespace of mcld 47 48 #endif 49 50