1 //===- FillFragment.cpp ---------------------------------------------------===//
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 #include <mcld/Fragment/FillFragment.h>
10 #include <mcld/LD/SectionData.h>
11 #include <cassert>
12
13 using namespace mcld;
14
15 //===----------------------------------------------------------------------===//
16 // FillFragment
17 //===----------------------------------------------------------------------===//
FillFragment(int64_t pValue,unsigned int pValueSize,uint64_t pSize,SectionData * pSD)18 FillFragment::FillFragment(int64_t pValue,
19 unsigned int pValueSize,
20 uint64_t pSize,
21 SectionData* pSD)
22 : Fragment(Fragment::Fillment, pSD), m_Value(pValue), m_ValueSize(pValueSize),
23 m_Size(pSize) {
24 assert((!m_ValueSize || (m_Size % m_ValueSize) == 0) &&
25 "Fill size must be a multiple of the value size!");
26 }
27
28