LIEF: Library to Instrument Executable Formats Version 0.15.1
Loading...
Searching...
No Matches
LoadConfigurationV10.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_V10_H
17#define LIEF_PE_LOAD_CONFIGURATION_V10_H
18#include <ostream>
19
20#include "LIEF/visibility.h"
21
23
24namespace LIEF {
25namespace PE {
26
27namespace details {
28template<class T>
30}
31
33 public:
34
35 static constexpr VERSION WIN_VERSION = VERSION::WIN_10_0_MSVC_2019;
37
38 template<class T>
40
43
44 VERSION version() const override {
45 return WIN_VERSION;
46 }
47
49 return guard_xfg_check_function_pointer_;
50 }
51
53 return guard_xfg_dispatch_function_pointer_;
54 }
55
57 return guard_xfg_table_dispatch_function_pointer_;
58 }
59
60 void guard_xfg_check_function_pointer(uint64_t value) {
61 guard_xfg_check_function_pointer_ = value;
62 }
63
65 guard_xfg_dispatch_function_pointer_ = value;
66 }
67
69 guard_xfg_table_dispatch_function_pointer_ = value;
70 }
71
72 static bool classof(const LoadConfiguration* config) {
73 return config->version() == WIN_VERSION;
74 }
75
76 ~LoadConfigurationV10() override = default;
77
78 void accept(Visitor& visitor) const override;
79
80 std::ostream& print(std::ostream& os) const override;
81
82 protected:
83 uint64_t guard_xfg_check_function_pointer_ = 0;
84 uint64_t guard_xfg_dispatch_function_pointer_ = 0;
85 uint64_t guard_xfg_table_dispatch_function_pointer_ = 0;
86};
87}
88}
89
90#endif
Definition LoadConfigurationV10.hpp:32
VERSION version() const override
(SDK) Version of the structure
Definition LoadConfigurationV10.hpp:44
uint64_t guard_xfg_dispatch_function_pointer() const
Definition LoadConfigurationV10.hpp:52
static bool classof(const LoadConfiguration *config)
Definition LoadConfigurationV10.hpp:72
void guard_xfg_table_dispatch_function_pointer(uint64_t value)
Definition LoadConfigurationV10.hpp:68
void accept(Visitor &visitor) const override
void guard_xfg_dispatch_function_pointer(uint64_t value)
Definition LoadConfigurationV10.hpp:64
uint64_t guard_xfg_table_dispatch_function_pointer() const
Definition LoadConfigurationV10.hpp:56
~LoadConfigurationV10() override=default
std::ostream & print(std::ostream &os) const override
uint64_t guard_xfg_check_function_pointer() const
Definition LoadConfigurationV10.hpp:48
void guard_xfg_check_function_pointer(uint64_t value)
Definition LoadConfigurationV10.hpp:60
LoadConfigurationV10 & operator=(const LoadConfigurationV10 &)=default
LoadConfigurationV10(const LoadConfigurationV10 &)=default
LoadConfigurationV10(const details::load_configuration_v10< T > &header)
Definition LoadConfigurationV9.hpp:31
Class that represents the default PE's LoadConfiguration
Definition LoadConfiguration.hpp:35
virtual VERSION version() const
(SDK) Version of the structure
Definition LoadConfiguration.hpp:64
VERSION
Definition LoadConfiguration.hpp:37
Definition Visitor.hpp:224
LIEF namespace.
Definition Abstract/Binary.hpp:32
Definition LoadConfigurationV10.hpp:29
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42