LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
DynamicFixupGeneric.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2025 R. Thomas
2 * Copyright 2017 - 2025 Quarkslab
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef LIEF_PE_LOAD_CONFIGURATION_DYNAMIC_FIXUP_GENERIC_H
17#define LIEF_PE_LOAD_CONFIGURATION_DYNAMIC_FIXUP_GENERIC_H
19
20#include "LIEF/iterators.hpp"
21
22namespace LIEF {
23namespace PE {
24class Relocation;
25
29 public:
30 using relocations_t = std::vector<std::unique_ptr<Relocation>>;
33
35
38
41
42 std::unique_ptr<DynamicFixup> clone() const override {
43 return std::unique_ptr<DynamicFixupGeneric>(new DynamicFixupGeneric(*this));
44 }
45
48 return relocations_;
49 }
50
52 return relocations_;
53 }
54
55 static bool classof(const DynamicFixup* fixup) {
56 return fixup->kind() == KIND::GENERIC;
57 }
58
59 std::string to_string() const override;
60
62
64 LIEF_LOCAL static
65 std::unique_ptr<DynamicFixupGeneric> parse(Parser& ctx, SpanStream& strm);
66
67 private:
68 relocations_t relocations_;
69};
70
71
72}
73}
74
75#endif
DynamicFixupGeneric & operator=(const DynamicFixupGeneric &)
std::vector< std::unique_ptr< Relocation > > relocations_t
Definition DynamicFixupGeneric.hpp:30
DynamicFixupGeneric(const DynamicFixupGeneric &)
DynamicFixupGeneric & operator=(DynamicFixupGeneric &&)
const_ref_iterator< const relocations_t &, Relocation * > it_const_relocations
Definition DynamicFixupGeneric.hpp:32
static bool classof(const DynamicFixup *fixup)
Definition DynamicFixupGeneric.hpp:55
it_relocations relocations()
Iterator over the relocations.
Definition DynamicFixupGeneric.hpp:47
std::string to_string() const override
ref_iterator< relocations_t &, Relocation * > it_relocations
Definition DynamicFixupGeneric.hpp:31
it_const_relocations relocations() const
Definition DynamicFixupGeneric.hpp:51
std::unique_ptr< DynamicFixup > clone() const override
Definition DynamicFixupGeneric.hpp:42
DynamicFixupGeneric(DynamicFixupGeneric &&)
@ GENERIC
If DynamicRelocation::symbol is not a special value.
Definition DynamicFixup.hpp:42
KIND kind() const
Encoding of the fixups.
Definition DynamicFixup.hpp:73
Main interface to parse PE binaries. In particular the static functions: Parser::parse should be used...
Definition PE/Parser.hpp:52
Class which represents the Base Relocation Block We usually find this structure in the ....
Definition PE/Relocation.hpp:43
Definition SpanStream.hpp:32
Iterator which returns reference on container's values.
Definition iterators.hpp:46
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
LIEF namespace.
Definition Abstract/Binary.hpp:40
ref_iterator< CT, U, typename decay_t< CT >::const_iterator > const_ref_iterator
Iterator which return const ref on container's values.
Definition iterators.hpp:257
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42