LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
DynamicRelocationV1.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2025 R. Thomas
2 * Copyright 2017 - 2025 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_RELOCATION_V1_H
17#define LIEF_PE_LOAD_CONFIGURATION_DYNAMIC_RELOCATION_V1_H
18
19#include <memory>
20#include <string>
21
22#include "LIEF/visibility.h"
24
25namespace LIEF {
26class BinaryStream;
27
28namespace PE {
29class Parser;
30
34 public:
38
41
44
45 std::unique_ptr<DynamicRelocation> clone() const override {
46 return std::unique_ptr<DynamicRelocationV1>(new DynamicRelocationV1(*this));
47 }
48
49 std::string to_string() const override;
50
51 static bool classof(const DynamicRelocation* reloc) {
52 return reloc->version() == 1;
53 }
54
55 ~DynamicRelocationV1() override = default;
56
58 template<class PE_T> LIEF_LOCAL static
59 std::unique_ptr<DynamicRelocationV1> parse(Parser& ctx, BinaryStream& strm);
60};
61
62}
63}
64
65#endif
Class that is used to a read stream of data from different sources.
Definition BinaryStream.hpp:33
DynamicRelocationV1(const DynamicRelocationV1 &)=default
DynamicRelocationV1 & operator=(const DynamicRelocationV1 &)=default
DynamicRelocationV1(DynamicRelocationV1 &&)=default
DynamicRelocationV1()
Definition DynamicRelocationV1.hpp:35
std::string to_string() const override
std::unique_ptr< DynamicRelocation > clone() const override
Definition DynamicRelocationV1.hpp:45
~DynamicRelocationV1() override=default
DynamicRelocationV1 & operator=(DynamicRelocationV1 &&)=default
static bool classof(const DynamicRelocation *reloc)
Definition DynamicRelocationV1.hpp:51
uint32_t version() const
Version of the structure.
Definition DynamicRelocationBase.hpp:76
Main interface to parse PE binaries. In particular the static functions: Parser::parse should be used...
Definition PE/Parser.hpp:52
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
LIEF namespace.
Definition Abstract/Binary.hpp:40
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42