LIEF: Library to Instrument Executable Formats Version 2.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
20#include "LIEF/span.hpp"
21
22#include <memory>
23#include <vector>
24
25
26namespace LIEF::PE {
27
31 public:
32 DynamicFixupUnknown(std::vector<uint8_t> payload) :
34 payload_(std::move(payload)) {}
35
38
41
42 std::unique_ptr<DynamicFixup> clone() const override {
43 return std::make_unique<DynamicFixupUnknown>(*this);
44 }
45
46 static bool classof(const DynamicFixup* fixup) {
47 return fixup->kind() == KIND::UNKNOWN;
48 }
49
50 std::string to_string() const override {
51 return "DynamicFixupUnknown(" + std::to_string(payload_.size()) + "bytes)";
52 }
53
56 return payload_;
57 }
58
60 return payload_;
61 }
62
63 ~DynamicFixupUnknown() override = default;
64
65 private:
66 std::vector<uint8_t> payload_;
67};
68
69
70}
71
72
73#endif
DynamicFixupUnknown & operator=(const DynamicFixupUnknown &)=default
~DynamicFixupUnknown() override=default
span< const uint8_t > payload() const
Raw fixups.
Definition DynamicFixupUnknown.hpp:55
std::unique_ptr< DynamicFixup > clone() const override
Definition DynamicFixupUnknown.hpp:42
std::string to_string() const override
Definition DynamicFixupUnknown.hpp:50
DynamicFixupUnknown(DynamicFixupUnknown &&)=default
DynamicFixupUnknown & operator=(DynamicFixupUnknown &&)=default
DynamicFixupUnknown(std::vector< uint8_t > payload)
Definition DynamicFixupUnknown.hpp:32
span< uint8_t > payload()
Definition DynamicFixupUnknown.hpp:59
static bool classof(const DynamicFixup *fixup)
Definition DynamicFixupUnknown.hpp:46
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
#define LIEF_LIFETIMEBOUND
Definition compiler_attributes.hpp:72
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
tcb::span< ElementType, Extent > span
Definition span.hpp:22
#define LIEF_API
Definition visibility.h:45