OpenASIP  2.0
RelocSection.cc
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file RelocSection.cc
26  *
27  * Non-inline definitions of RelocSection class.
28  *
29  * @author Jussi Nykänen 2003 (nykanen-no.spam-cs.tut.fi)
30  * @author Mikael Lepistö 2003 (tmlepist-no.spam-cs.tut.fi)
31  * @note reviewed 22 October 2003 by ml, jn, ao, tr
32  *
33  * @note rating: yellow
34  */
35 
36 #include "RelocSection.hh"
37 
38 namespace TPEF {
39 
40 using ReferenceManager::SafePointer;
41 
42 RelocSection RelocSection::proto_(true);
43 
44 /**
45  * Constructor.
46  *
47  * @param init True if registeration is wanted.
48  */
50  Section(), refSection_(&SafePointer::null) {
51 
52  if (init) {
54  }
55 
56  unsetFlagVLen();
59 }
60 
61 /**
62  * Destructor.
63  */
65 }
66 
67 /**
68  * Returns section's type.
69  *
70  * @return Type of section.
71  */
74  return ST_RELOC;
75 }
76 
77 /**
78  * Creates an instance of class.
79  *
80  * @return Newly created section.
81  */
82 Section*
84  return new RelocSection(false);
85 }
86 
87 }
TPEF::RelocSection::~RelocSection
virtual ~RelocSection()
Definition: RelocSection.cc:64
TPEF::RelocSection::proto_
static RelocSection proto_
Prototype instance of section.
Definition: RelocSection.hh:64
TPEF::RelocSection::clone
virtual Section * clone() const
Definition: RelocSection.cc:83
TPEF::Section::unsetFlagVLen
void unsetFlagVLen()
TPEF::RelocSection::type
virtual SectionType type() const
Definition: RelocSection.cc:73
TPEF::Section
Definition: Section.hh:64
TPEF::RelocSection::RelocSection
RelocSection(bool init)
Definition: RelocSection.cc:49
RelocSection.hh
TPEF::ReferenceManager::SafePointer
Definition: SafePointer.hh:188
TPEF::Section::unsetFlagNoBits
void unsetFlagNoBits()
TPEF::Section::setStartingAddress
void setStartingAddress(AddressImage address)
TPEF::Section::registerSection
static void registerSection(const Section *section)
Definition: Section.cc:114
TPEF::Section::ST_RELOC
@ ST_RELOC
Relocation section.
Definition: Section.hh:74
TPEF::Section::SectionType
SectionType
Definition: Section.hh:69
TPEF
Definition: Assembler.hh:43