LIEF: Library to Instrument Executable Formats Version 0.17.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
56 TLS(
const TLS& copy) =
default;
59 TLS(TLS&& other)
noexcept =
default;
61 const std::vector<uint64_t>&
callbacks()
const {
71 callbacks_.push_back(addr);
89 return addressof_index_;
97 return addressof_callbacks_;
103 return sizeof_zero_fill_;
111 return characteristics_;
116 return data_template_;
121 return directory_ !=
nullptr;
136 return section_ !=
nullptr;
149 callbacks_ = std::move(callbacks);
153 va_rawdata_ = addresses;
157 addressof_index_ = addr_idx;
161 addressof_callbacks_ = addr;
165 sizeof_zero_fill_ = size;
169 characteristics_ = characteristics;
173 data_template_ = std::move(data_template);
176 void accept(Visitor& visitor)
const override;
181 std::vector<uint64_t> callbacks_;
182 std::pair<uint64_t, uint64_t> va_rawdata_;
183 uint64_t addressof_index_ = 0;
184 uint64_t addressof_callbacks_ = 0;
185 uint32_t sizeof_zero_fill_ = 0;
186 uint32_t characteristics_ = 0;
187 DataDirectory* directory_ =
nullptr;
188 Section* section_ =
nullptr;
189 std::vector<uint8_t> data_template_;
Class which represents a PE binary This is the main interface to manage and modify a PE executable.
Definition PE/Binary.hpp:56
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:42
Main interface to parse PE binaries. In particular the static functions: Parser::parse should be used...
Definition PE/Parser.hpp:52
Class which represents a PE section.
Definition PE/Section.hpp:43
Class which represents the PE Thread Local Storage.
Definition TLS.hpp:43
DataDirectory * directory()
Return the DataDirectory associated with this object or a nullptr If it exists, its type should be Da...
Definition TLS.hpp:126
friend std::ostream & operator<<(std::ostream &os, const TLS &entry)
TLS & add_callback(uint64_t addr)
Add a new TLS callback.
Definition TLS.hpp:70
const std::pair< uint64_t, uint64_t > & addressof_raw_data() const
Pair (start address, end address) of the TLS template. The template is a block of data that is used t...
Definition TLS.hpp:82
const DataDirectory * directory() const
Definition TLS.hpp:130
const std::vector< uint64_t > & callbacks() const
List of the callback associated with the current TLS.
Definition TLS.hpp:65
void addressof_callbacks(uint64_t addr)
Definition TLS.hpp:160
void callbacks(std::vector< uint64_t > callbacks)
Definition TLS.hpp:148
uint32_t sizeof_zero_fill() const
Size in bytes of the zero to be padded after the data specified by data_template.
Definition TLS.hpp:102
void addressof_index(uint64_t addr_idx)
Definition TLS.hpp:156
void addressof_raw_data(std::pair< uint64_t, uint64_t > addresses)
Definition TLS.hpp:152
bool has_section() const
Check if there is a section associated with this entry.
Definition TLS.hpp:135
uint32_t characteristics() const
The four bits [23:20] describe alignment info. Possible values are those defined as IMAGE_SCN_ALIGN_*...
Definition TLS.hpp:110
TLS(const details::pe32_tls &header)
void characteristics(uint32_t characteristics)
Definition TLS.hpp:168
uint64_t addressof_callbacks() const
Pointer to an array of TLS callback functions.
Definition TLS.hpp:96
void sizeof_zero_fill(uint32_t size)
Definition TLS.hpp:164
TLS(const details::pe64_tls &header)
Section * section()
The section associated with the entry (or a nullptr)
Definition TLS.hpp:140
uint64_t addressof_index() const
The location to receive the TLS index assigned by the loader. This location should be located in a wr...
Definition TLS.hpp:88
TLS(TLS &&other) noexcept=default
void accept(Visitor &visitor) const override
bool has_data_directory() const
True if there is a data directory associated with this entry.
Definition TLS.hpp:120
TLS & operator=(const TLS ©)=default
TLS & operator=(TLS &&other) noexcept=default
void data_template(std::vector< uint8_t > data_template)
Definition TLS.hpp:172
span< const uint8_t > data_template() const
The initial content used to initialize TLS data.
Definition TLS.hpp:115
TLS(const TLS ©)=default
const Section * section() const
Definition TLS.hpp:144
Definition DataDirectory.hpp:37
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42