MipsELFDynamic.h revision 87f34658dec9097d987d254a990ea7f311bfc95f
1//===- MipsELFDynamic.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_Mips_ELFDYNAMIC_SECTION_H
10#define MCLD_Mips_ELFDYNAMIC_SECTION_H
11#ifdef ENABLE_UNITTEST
12#include <gtest.h>
13#endif
14
15#include <mcld/Target/ELFDynamic.h>
16
17namespace mcld {
18
19class MipsGNULDBackend;
20
21class MipsELFDynamic : public ELFDynamic
22{
23public:
24  MipsELFDynamic(const MipsGNULDBackend& pParent, const LinkerConfig& pConfig);
25
26private:
27  const MipsGNULDBackend& m_pParent;
28  const LinkerConfig& m_pConfig;
29
30private:
31  void reserveTargetEntries(const ELFFileFormat& pFormat);
32  void applyTargetEntries(const ELFFileFormat& pFormat);
33
34  size_t getSymTabNum(const ELFFileFormat& pFormat) const;
35  size_t getGotSym(const ELFFileFormat& pFormat) const;
36  size_t getLocalGotNum(const ELFFileFormat& pFormat) const;
37  uint64_t getBaseAddress();
38};
39
40} // namespace of mcld
41
42#endif
43