LIEF: Library to Instrument Executable Formats Version 0.15.0
Loading...
Searching...
No Matches
LoadConfigurationV4.hpp
1/* Copyright 2017 - 2024 R. Thomas
2 * Copyright 2017 - 2024 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_V4_H
17#define LIEF_PE_LOAD_CONFIGURATION_V4_H
18#include <ostream>
19
20#include "LIEF/visibility.h"
21
22#include "LIEF/PE/LoadConfigurations/LoadConfigurationV3.hpp"
23
24namespace LIEF {
25namespace PE {
26
27namespace details {
28template<class T>
30}
31
36 public:
37 static constexpr VERSION WIN_VERSION = VERSION::WIN_10_0_14383;
38
39 LoadConfigurationV4() = default;
40
41 template<class T>
43
44 LoadConfigurationV4& operator=(const LoadConfigurationV4&) = default;
46
47 VERSION version() const override {
48 return WIN_VERSION;
49 }
50
52 uint64_t dynamic_value_reloc_table() const {
53 return dynamic_value_reloc_table_;
54 }
55
56 uint64_t hybrid_metadata_pointer() const {
57 return hybrid_metadata_pointer_;
58 }
59
60 void dynamic_value_reloc_table(uint64_t value) {
61 dynamic_value_reloc_table_ = value;
62 }
63
64 void hybrid_metadata_pointer(uint64_t value) {
65 hybrid_metadata_pointer_ = value;
66 }
67
68 static bool classof(const LoadConfiguration* config) {
69 return config->version() == WIN_VERSION;
70 }
71
72 ~LoadConfigurationV4() override = default;
73
74 void accept(Visitor& visitor) const override;
75
76 std::ostream& print(std::ostream& os) const override;
77
78 protected:
79 uint64_t dynamic_value_reloc_table_ = 0;
80 uint64_t hybrid_metadata_pointer_ = 0;
81};
82}
83}
84
85#endif
LoadConfiguration with Control Flow Guard improved.
Definition LoadConfigurationV3.hpp:32
Load Configuration enhanced with.
Definition LoadConfigurationV4.hpp:35
uint64_t dynamic_value_reloc_table() const
VA of pointing to a IMAGE_DYNAMIC_RELOCATION_TABLE
Definition LoadConfigurationV4.hpp:52
VERSION version() const override
(SDK) Version of the structure
Definition LoadConfigurationV4.hpp:47
LIEF namespace.
Definition Abstract/Binary.hpp:32
Definition LoadConfigurationV4.hpp:29