LIEF: Library to Instrument Executable Formats Version 0.17.0
|
Class that represents a PE import. More...
#include <Import.hpp>
Public Types | |
using | entries_t = std::vector<ImportEntry> |
using | it_entries = ref_iterator<entries_t&> |
using | it_const_entries = const_ref_iterator<const entries_t&> |
Public Types inherited from LIEF::Object | |
template<class T > | |
using | output_t = add_pointer_t<decay_t<T>> |
template<class T > | |
using | output_const_t = add_pointer_t<add_const_t<decay_t<T>>> |
Public Member Functions | |
Import (const details::pe_import &import) | |
Import (std::string name) | |
Import ()=default | |
~Import () override=default | |
Import (const Import &other)=default | |
Import (Import &&other) noexcept=default | |
Import & | operator= (Import &&other) noexcept=default |
Import & | operator= (const Import &other)=default |
uint32_t | forwarder_chain () const |
The index of the first forwarder reference. | |
uint32_t | timedatestamp () const |
The stamp that is set to zero until the image is bound. After the image is bound, this field is set to the time/data stamp of the DLL. | |
it_const_entries | entries () const |
Iterator over the PE::ImportEntry. | |
it_entries | entries () |
uint32_t | import_address_table_rva () const |
The RVA of the import address table (IAT ). The content of this table is identical to the content of the Import Lookup Table (ILT ) until the image is bound. | |
uint32_t | import_lookup_table_rva () const |
Return the relative virtual address of the import lookup table. | |
result< uint32_t > | get_function_rva_from_iat (const std::string &function) const |
Return the Function's RVA from the import address table (IAT ) | |
ImportEntry * | get_entry (const std::string &name) |
Return the imported function with the given name. | |
const ImportEntry * | get_entry (const std::string &name) const |
const std::string & | name () const |
Return the library's name (e.g. kernel32.dll ) | |
void | name (std::string name) |
Change the current import name. | |
DataDirectory * | directory () |
Return the PE::DataDirectory associated with this import. It should be the one at index PE::DataDirectory::TYPES::IMPORT_TABLE. | |
const DataDirectory * | directory () const |
DataDirectory * | iat_directory () |
Return the PE::DataDirectory associated associated with the IAT. It should be the one at index PE::DataDirectory::TYPES::IAT. | |
const DataDirectory * | iat_directory () const |
ImportEntry & | add_entry (ImportEntry entry) |
Add a new import entry (i.e. an imported function) | |
ImportEntry & | add_entry (const std::string &name) |
Add a new import entry with the given name (i.e. an imported function) | |
void | import_lookup_table_rva (uint32_t rva) |
void | import_address_table_rva (uint32_t rva) |
void | accept (Visitor &visitor) const override |
Public Member Functions inherited from LIEF::Object | |
Object () | |
Object (const Object &other) | |
Object & | operator= (const Object &other) |
template<class T > | |
output_t< T > | as () |
template<class T > | |
output_const_t< T > | as () const |
virtual bool | operator== (const Object &other) const |
virtual bool | operator!= (const Object &other) const |
virtual | ~Object () |
Class that represents a PE import.
using LIEF::PE::Import::entries_t = std::vector<ImportEntry> |
using LIEF::PE::Import::it_const_entries = const_ref_iterator<const entries_t&> |
LIEF::PE::Import::Import | ( | const details::pe_import & | import | ) |
|
inline |
|
default |
|
overridedefault |
|
default |
|
defaultnoexcept |
|
overridevirtual |
Implements LIEF::Object.
|
inline |
Add a new import entry with the given name (i.e. an imported function)
|
inline |
Add a new import entry (i.e. an imported function)
|
inline |
Return the PE::DataDirectory associated with this import. It should be the one at index PE::DataDirectory::TYPES::IMPORT_TABLE.
If the data directory can't be found, return a nullptr
|
inline |
|
inline |
|
inline |
Iterator over the PE::ImportEntry.
|
inline |
The index of the first forwarder reference.
|
inline |
Return the imported function with the given name.
const ImportEntry * LIEF::PE::Import::get_entry | ( | const std::string & | name | ) | const |
result< uint32_t > LIEF::PE::Import::get_function_rva_from_iat | ( | const std::string & | function | ) | const |
Return the Function's RVA from the import address table (IAT
)
|
inline |
Return the PE::DataDirectory associated associated with the IAT. It should be the one at index PE::DataDirectory::TYPES::IAT.
If the data directory can't be found, return a nullptr
|
inline |
|
inline |
The RVA of the import address table (IAT
). The content of this table is identical to the content of the Import Lookup Table (ILT
) until the image is bound.
|
inline |
|
inline |
Return the relative virtual address of the import lookup table.
|
inline |
|
inline |
Return the library's name (e.g. kernel32.dll
)
|
inline |
Change the current import name.
|
inline |
The stamp that is set to zero until the image is bound. After the image is bound, this field is set to the time/data stamp of the DLL.