summaryrefslogtreecommitdiff
path: root/include/mcld/Target/ELFDynamic.tcc
blob: 8b046514c6e34b0c2ebeeaa1477b3a2c1c0cb7c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//===- ELFDynamic.h -------------------------------------------------------===//
//
//                     The MCLinker Project
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

Entry<32, true>::Entry()
{
  m_Pair.d_tag = 0;
  m_Pair.d_un.d_val = 0;
}

Entry<32, true>::~Entry()
{
}

void Entry<32, true>::setValue(uint64_t pTag, uint64_t pValue)
{
  m_Pair.d_tag = pTag;
  m_Pair.d_un.d_val = pValue;
}

size_t Entry<32, true>::emit(uint8_t* pAddress) const
{
  memcpy(reinterpret_cast<void*>(pAddress),
         reinterpret_cast<const void*>(&m_Pair),
         sizeof(Pair));
  return sizeof(Pair);
}