| 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 | namespace elfpp |
|---|
| 22 | { |
|---|
| 23 | |
|---|
| 24 | symbol * reloc::get_mangled_symbol() const |
|---|
| 25 | { |
|---|
| 26 | return sym_mod_; |
|---|
| 27 | } |
|---|
| 28 | |
|---|
| 29 | symbol * reloc::get_symbol() const |
|---|
| 30 | { |
|---|
| 31 | return sym_; |
|---|
| 32 | } |
|---|
| 33 | |
|---|
| 34 | void reloc::set_section(section *s) |
|---|
| 35 | { |
|---|
| 36 | sec_ = s; |
|---|
| 37 | } |
|---|
| 38 | |
|---|
| 39 | section * reloc::get_section() const |
|---|
| 40 | { |
|---|
| 41 | return sec_; |
|---|
| 42 | } |
|---|
| 43 | |
|---|
| 44 | void reloc::set_type(enum reloc_e type) |
|---|
| 45 | { |
|---|
| 46 | type_ = type; |
|---|
| 47 | } |
|---|
| 48 | |
|---|
| 49 | enum reloc_e reloc::get_type() const |
|---|
| 50 | { |
|---|
| 51 | return type_; |
|---|
| 52 | } |
|---|
| 53 | |
|---|
| 54 | void reloc::set_addend(int64_t addend) |
|---|
| 55 | { |
|---|
| 56 | addend_ = addend; |
|---|
| 57 | } |
|---|
| 58 | |
|---|
| 59 | int64_t reloc::get_addend() const |
|---|
| 60 | { |
|---|
| 61 | return addend_; |
|---|
| 62 | } |
|---|
| 63 | |
|---|
| 64 | void reloc::set_offset(uint64_t offset) |
|---|
| 65 | { |
|---|
| 66 | offset_ = offset; |
|---|
| 67 | } |
|---|
| 68 | |
|---|
| 69 | uint64_t reloc::get_offset() const |
|---|
| 70 | { |
|---|
| 71 | return offset_; |
|---|
| 72 | } |
|---|
| 73 | |
|---|
| 74 | } |
|---|
| 75 | |
|---|