LIEF: Library to Instrument Executable Formats Version 0.16.0
Loading...
Searching...
No Matches
LoadConfigurationV4.hpp
Go to the documentation of this file.
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
23
24namespace LIEF {
25namespace PE {
26
27namespace details {
28template<class T>
30}
36 public:
37 static constexpr VERSION WIN_VERSION = VERSION::WIN_10_0_14383;
38
40
41 template<class T>
42 LIEF_LOCAL LoadConfigurationV4(const details::load_configuration_v4<T>& header);
43
44 LoadConfigurationV4& operator=(const LoadConfigurationV4&) = default;
45 LoadConfigurationV4(const LoadConfigurationV4&) = default;
46
47 VERSION version() const override {
48 return WIN_VERSION;
49 }
50 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
LoadConfigurationV4 & operator=(const LoadConfigurationV4 &)=default
uint64_t dynamic_value_reloc_table() const
VA of pointing to a IMAGE_DYNAMIC_RELOCATION_TABLE
Definition LoadConfigurationV4.hpp:52
LoadConfigurationV4()=default
void accept(Visitor &visitor) const override
LoadConfigurationV4(const LoadConfigurationV4 &)=default
std::ostream & print(std::ostream &os) const override
uint64_t hybrid_metadata_pointer() const
Definition LoadConfigurationV4.hpp:56
~LoadConfigurationV4() override=default
LoadConfigurationV4(const details::load_configuration_v4< T > &header)
void hybrid_metadata_pointer(uint64_t value)
Definition LoadConfigurationV4.hpp:64
void dynamic_value_reloc_table(uint64_t value)
Definition LoadConfigurationV4.hpp:60
VERSION version() const override
(SDK) Version of the structure
Definition LoadConfigurationV4.hpp:47
static bool classof(const LoadConfiguration *config)
Definition LoadConfigurationV4.hpp:68
virtual VERSION version() const
(SDK) Version of the structure
Definition LoadConfiguration.hpp:64
Definition CodeIntegrity.hpp:26
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
LIEF namespace.
Definition Abstract/Binary.hpp:36
Definition LoadConfigurationV4.hpp:29
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42