LIEF: Library to Instrument Executable Formats Version 2.0.0
Loading...
Searching...
No Matches
DynamicRelocationV1.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2026 R. Thomas
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15#ifndef LIEF_PE_LOAD_CONFIGURATION_DYNAMIC_RELOCATION_V1_H
16#define LIEF_PE_LOAD_CONFIGURATION_DYNAMIC_RELOCATION_V1_H
17
18#include <memory>
19#include <string>
20
22#include "LIEF/visibility.h"
23
24namespace LIEF {
25class BinaryStream;
26
27namespace PE {
28class Parser;
29
33 public:
36
39
42
43 std::unique_ptr<DynamicRelocation> clone() const override {
44 return std::make_unique<DynamicRelocationV1>(*this);
45 }
46
47 std::string to_string() const override;
48
49 static bool classof(const DynamicRelocation* reloc) {
50 return reloc->version() == 1;
51 }
52
53 ~DynamicRelocationV1() override = default;
54
56 template<class PE_T>
57 LIEF_LOCAL static std::unique_ptr<DynamicRelocationV1> parse(Parser& ctx,
58 BinaryStream& strm);
59};
60
61}
62}
63
64#endif
Class that is used to a read stream of data from different sources.
Definition BinaryStream.hpp:34
DynamicRelocationV1(const DynamicRelocationV1 &)=default
DynamicRelocationV1 & operator=(const DynamicRelocationV1 &)=default
DynamicRelocationV1(DynamicRelocationV1 &&)=default
DynamicRelocationV1()
Definition DynamicRelocationV1.hpp:34
std::string to_string() const override
std::unique_ptr< DynamicRelocation > clone() const override
Definition DynamicRelocationV1.hpp:43
~DynamicRelocationV1() override=default
DynamicRelocationV1 & operator=(DynamicRelocationV1 &&)=default
static bool classof(const DynamicRelocation *reloc)
Definition DynamicRelocationV1.hpp:49
uint32_t version() const
Version of the structure.
Definition DynamicRelocationBase.hpp:75
Main interface to parse PE binaries. In particular, the static Parser::parse functions should be used...
Definition PE/Parser.hpp:53
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:31
LIEF namespace.
Definition Abstract/Binary.hpp:41
#define LIEF_API
Definition visibility.h:44
#define LIEF_LOCAL
Definition visibility.h:45