16#ifndef LIEF_PE_DATADIRECTORY_H
17#define LIEF_PE_DATADIRECTORY_H
22#include "LIEF/Object.hpp"
23#include "LIEF/visibility.h"
34struct pe_data_directory;
45 static constexpr size_t DEFAULT_NB = 16;
47 enum class TYPES:
size_t {
53 BASE_RELOCATION_TABLE,
61 DELAY_IMPORT_DESCRIPTOR,
72 DataDirectory(
const details::pe_data_directory& header, TYPES type);
84 uint32_t
RVA()
const {
96 return section_ !=
nullptr;
103 const Section* section()
const {
112 void size(uint32_t size) {
116 void RVA(uint32_t rva) {
120 void accept(Visitor& visitor)
const override;
122 LIEF_API
friend std::ostream& operator<<(std::ostream& os,
const DataDirectory& entry);
127 TYPES type_ = TYPES::UNKNOWN;
128 Section* section_ =
nullptr;
131LIEF_API
const char* to_string(DataDirectory::TYPES e);
Class which represents a PE binary This is the main interface to manage and modify a PE executable.
Definition PE/Binary.hpp:54
Class that is used to rebuild a raw PE binary from a PE::Binary object.
Definition PE/Builder.hpp:45
Class that represents a PE data directory entry.
Definition DataDirectory.hpp:38
uint32_t RVA() const
The relative virtual address of the content of this data directory.
Definition DataDirectory.hpp:84
bool has_section() const
Check if the content of this data directory is associated with a PE Cection.
Definition DataDirectory.hpp:95
TYPES type() const
Type of the data directory.
Definition DataDirectory.hpp:108
Section * section()
Section associated with the DataDirectory.
Definition DataDirectory.hpp:100
uint32_t size() const
The size of the content.
Definition DataDirectory.hpp:89
Main interface to parse PE binaries. In particular the static functions: Parser::parse should be used...
Definition PE/Parser.hpp:47
Class which represents a PE section.
Definition PE/Section.hpp:41
LIEF namespace.
Definition Abstract/Binary.hpp:32