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