48 TLS(
const details::pe32_tls& header);
49 TLS(
const details::pe64_tls& header);
80 return addressof_index_;
88 return addressof_callbacks_;
94 return sizeof_zero_fill_;
102 return characteristics_;
107 return data_template_;
112 return directory_ !=
nullptr;
127 return section_ !=
nullptr;
140 callbacks_ = std::move(callbacks);
144 va_rawdata_ = addresses;
148 addressof_index_ = addr_idx;
152 addressof_callbacks_ = addr;
156 sizeof_zero_fill_ = size;
160 characteristics_ = characteristics;
164 data_template_ = std::move(data_template);
172 std::vector<uint64_t> callbacks_;
173 std::pair<uint64_t, uint64_t> va_rawdata_;
174 uint64_t addressof_index_ = 0;
175 uint64_t addressof_callbacks_ = 0;
176 uint32_t sizeof_zero_fill_ = 0;
177 uint32_t characteristics_ = 0;
180 std::vector<uint8_t> data_template_;
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
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:40
Class which represents the PE Thread Local Storage.
Definition TLS.hpp:42
DataDirectory * directory()
Return the DataDirectory associated with this object or a nullptr If it exists, its type should be Da...
Definition TLS.hpp:117
friend std::ostream & operator<<(std::ostream &os, const TLS &entry)
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:73
const DataDirectory * directory() const
Definition TLS.hpp:121
const std::vector< uint64_t > & callbacks() const
List of the callback associated with the current TLS.
Definition TLS.hpp:61
void addressof_callbacks(uint64_t addr)
Definition TLS.hpp:151
void callbacks(std::vector< uint64_t > callbacks)
Definition TLS.hpp:139
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:93
void addressof_index(uint64_t addr_idx)
Definition TLS.hpp:147
void addressof_raw_data(std::pair< uint64_t, uint64_t > addresses)
Definition TLS.hpp:143
bool has_section() const
Check if there is a section associated with this entry.
Definition TLS.hpp:126
uint32_t characteristics() const
The four bits [23:20] describe alignment info. Possible values are those defined as IMAGE_SCN_ALIGN_*...
Definition TLS.hpp:101
TLS(const details::pe32_tls &header)
void characteristics(uint32_t characteristics)
Definition TLS.hpp:159
uint64_t addressof_callbacks() const
Pointer to an array of TLS callback functions.
Definition TLS.hpp:87
void sizeof_zero_fill(uint32_t size)
Definition TLS.hpp:155
TLS(const details::pe64_tls &header)
Section * section()
The section associated with the entry (or a nullptr)
Definition TLS.hpp:131
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:79
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:111
TLS & operator=(const TLS ©)=default
TLS & operator=(TLS &&other) noexcept=default
void data_template(std::vector< uint8_t > data_template)
Definition TLS.hpp:163
span< const uint8_t > data_template() const
The initial content used to initialize TLS data.
Definition TLS.hpp:106
TLS(const TLS ©)=default
const Section * section() const
Definition TLS.hpp:135
Definition Visitor.hpp:224
LIEF namespace.
Definition Abstract/Binary.hpp:32
tcb::span< ElementType, Extent > span
Definition span.hpp:22
#define LIEF_API
Definition visibility.h:41