13 #ifndef RETDEC_PELIB_RELOCATIONSDIRECTORY_H
14 #define RETDEC_PELIB_RELOCATIONSDIRECTORY_H
48 void read(
const std::uint8_t * data, std::uint32_t uiSize, std::uint32_t sizeOfImage);
50 unsigned int size()
const;
57 std::uint16_t
getRelocationData(
unsigned int ulRelocation,
unsigned int ulDataNumber)
const;
60 void setRelocationData(
unsigned int ulRelocation,
unsigned int ulDataNumber, std::uint16_t wData);
65 void setSizeOfBlock(
unsigned int ulRelocation, std::uint32_t dwValue);
Definition: ImageLoader.h:138
Class that handles the relocations directory.
Definition: RelocationsDirectory.h:25
void addRelocation()
Definition: RelocationsDirectory.cpp:213
LoaderError m_ldrError
Definition: RelocationsDirectory.h:28
void setLoaderError(LoaderError ldrError)
Definition: RelocationsDirectory.cpp:63
std::uint32_t getSizeOfBlock(unsigned int ulRelocation) const
Returns the SizeOfBlock value of a relocation.
Definition: RelocationsDirectory.cpp:188
void setVirtualAddress(unsigned int ulRelocation, std::uint32_t dwValue)
Changes the VirtualAddress of a relocation.
Definition: RelocationsDirectory.cpp:203
unsigned int calcNumberOfRelocationData(unsigned int ulRelocation) const
Returns the number of relocation data entries of a specific relocation.
Definition: RelocationsDirectory.cpp:193
virtual ~RelocationsDirectory()=default
int read(ImageLoader &imageLoader)
Read a file's relocations directory.
Definition: RelocationsDirectory.cpp:24
unsigned int calcNumberOfRelocations() const
Returns the number of relocations in the relocations directory.
Definition: RelocationsDirectory.cpp:178
LoaderError loaderError() const
Retrieve the loader error.
Definition: RelocationsDirectory.cpp:58
RelocationsDirectory()
Error detected by the import table parser.
Definition: RelocationsDirectory.cpp:21
void removeRelocationData(unsigned int ulRelocation, std::uint16_t wValue)
Removes data from a relocation.
void removeRelocation(unsigned int index)
Definition: RelocationsDirectory.cpp:231
void setSizeOfBlock(unsigned int ulRelocation, std::uint32_t dwValue)
Changes the SizeOfBlock of a relocation.
Definition: RelocationsDirectory.cpp:208
void setRelocationData(unsigned int ulRelocation, unsigned int ulDataNumber, std::uint16_t wData)
Changes the relocation data of a relocation.
Definition: RelocationsDirectory.cpp:72
std::uint16_t getRelocationData(unsigned int ulRelocation, unsigned int ulDataNumber) const
Returns the RelocationData of a relocation.
Definition: RelocationsDirectory.cpp:198
std::vector< IMG_BASE_RELOC > m_vRelocations
Used to store the relocation data.
Definition: RelocationsDirectory.h:27
std::uint32_t getVirtualAddress(unsigned int ulRelocation) const
Returns the VA of a relocation.
Definition: RelocationsDirectory.cpp:183
void addRelocationData(unsigned int ulRelocation, std::uint16_t wValue)
Adds new data to a relocation.
Definition: RelocationsDirectory.cpp:219
unsigned int size() const
Returns the size of the relocations directory.
Definition: RelocationsDirectory.cpp:166
Definition: BoundImportDirectory.h:21
LoaderError
Definition: PeLibAux.h:47