LIEF: Library to Instrument Executable Formats Version 1.0.0
Loading...
Searching...
No Matches
DynamicFixupUnknown.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2026 R. Thomas
2 * Copyright 2017 - 2026 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_UNKNOWN_H
17#define LIEF_PE_LOAD_CONFIGURATION_DYNAMIC_FIXUP_UNKNOWN_H
18#include "LIEF/span.hpp"
20
21#include <vector>
22
23namespace LIEF {
24namespace PE {
25
29 public:
30 DynamicFixupUnknown(std::vector<uint8_t> payload) :
32 payload_(std::move(payload)) {}
33
36
39
40 std::unique_ptr<DynamicFixup> clone() const override {
41 return std::unique_ptr<DynamicFixupUnknown>(new DynamicFixupUnknown(*this));
42 }
43
44 static bool classof(const DynamicFixup* fixup) {
45 return fixup->kind() == KIND::UNKNOWN;
46 }
47
48 std::string to_string() const override {
49 return "DynamicFixupUnknown(" + std::to_string(payload_.size()) + "bytes)";
50 }
51
54 return payload_;
55 }
56
58 return payload_;
59 }
60
61 ~DynamicFixupUnknown() override = default;
62
63 private:
64 std::vector<uint8_t> payload_;
65};
66
67
68}
69}
70
71#endif
DynamicFixupUnknown & operator=(const DynamicFixupUnknown &)=default
~DynamicFixupUnknown() override=default
span< const uint8_t > payload() const
Raw fixups.
Definition DynamicFixupUnknown.hpp:53
std::unique_ptr< DynamicFixup > clone() const override
Definition DynamicFixupUnknown.hpp:40
std::string to_string() const override
Definition DynamicFixupUnknown.hpp:48
DynamicFixupUnknown(DynamicFixupUnknown &&)=default
DynamicFixupUnknown & operator=(DynamicFixupUnknown &&)=default
DynamicFixupUnknown(std::vector< uint8_t > payload)
Definition DynamicFixupUnknown.hpp:30
span< uint8_t > payload()
Definition DynamicFixupUnknown.hpp:57
static bool classof(const DynamicFixup *fixup)
Definition DynamicFixupUnknown.hpp:44
DynamicFixupUnknown(const DynamicFixupUnknown &)=default
KIND
Definition DynamicFixup.hpp:36
@ UNKNOWN
If DynamicRelocation::symbol is a special value that is not supported by LIEF.
Definition DynamicFixup.hpp:39
KIND kind() const
Encoding of the fixups.
Definition DynamicFixup.hpp:75
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
LIEF namespace.
Definition Abstract/Binary.hpp:40
tcb::span< ElementType, Extent > span
Definition span.hpp:22
Definition string.h:155
#define LIEF_API
Definition visibility.h:43