source: soft/giet_vm/memo/include/libelfpp/elfpp/elfpp_object.hxx @ 763

Last change on this file since 763 was 163, checked in by karaoui, 12 years ago

changing mover to memo
changing soft.bin to soft.elf
...

File size: 1.3 KB
Line 
1/*
2    This file is part of Libelfpp.
3
4    Libelfpp is free software: you can redistribute it and/or modify
5    it under the terms of the GNU Lesser General Public License as
6    published by the Free Software Foundation, either version 3 of the
7    License, or (at your option) any later version.
8
9    Libelfpp is distributed in the hope that it will be useful, but
10    WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    General Public License for more details.
13
14    You should have received a copy of the GNU Lesser General Public
15    License along with Libelfpp.  If not, see
16    <http://www.gnu.org/licenses/>.
17
18   Copyright (c) Alexandre Becoulet <alexandre.becoulet@free.fr>
19*/
20
21#ifndef ELFPP_OBJECT_HXX_
22#define ELFPP_OBJECT_HXX_
23
24#include <stdexcept>
25
26namespace elfpp
27{
28
29  symbol & object::get_symbol(const std::string &name)
30  {
31    sym_tab_map_t::iterator i = sym_tab_.find(name);
32
33    if (i == sym_tab_.end())
34      throw std::runtime_error("no such symbol name");
35
36    return *i->second;
37  }
38
39  const sym_tab_map_t & object::get_symbol_table() const
40  {
41    return sym_tab_;
42  }
43
44  dpp::linked_list<section> & object::get_section_table()
45  {
46    return section_tab_;
47  }
48
49  dpp::linked_list<segment> & object::get_segment_table()
50  {
51    return segment_tab_;
52  }
53
54}
55
56#endif
57
Note: See TracBrowser for help on using the repository browser.