Go to the source code of this file.
◆ bin_pe_init_tls()
Definition at line 71 of file pe_tls.c.
72 PE_(image_tls_directory) * image_tls_directory;
76 image_tls_directory =
RZ_NEW0(
PE_(image_tls_directory));
79 free(image_tls_directory);
82 bin->tls_directory = image_tls_directory;
83 if (!image_tls_directory->AddressOfCallBacks) {
86 if (image_tls_directory->EndAddressOfRawData < image_tls_directory->StartAddressOfRawData) {
RZ_API void Ht_() free(HtName_(Ht) *ht)
PE_DWord PE_() bin_pe_va_to_rva(RzBinPEObj *bin, PE_DWord va)
PE_DWord PE_() bin_pe_rva_to_paddr(RzBinPEObj *bin, PE_DWord rva)
#define PE_IMAGE_DIRECTORY_ENTRY_TLS
static void bin_pe_store_tls_callbacks(RzBinPEObj *bin, PE_DWord callbacks)
static int read_tls_directory(RzBuffer *b, ut64 addr, PE_(image_tls_directory) *tls_directory)
#define RZ_LOG_INFO(fmtstr,...)
References bin_pe_rva_to_paddr(), bin_pe_store_tls_callbacks(), bin_pe_va_to_rva(), free(), PE_, PE_DWord, PE_IMAGE_DIRECTORY_ENTRY_TLS, read_tls_directory(), RZ_LOG_INFO, and RZ_NEW0.
Referenced by bin_pe_init().
◆ bin_pe_store_tls_callbacks()
Definition at line 8 of file pe_tls.c.
14 while (addressOfTLSCallback != 0) {
19 if (!addressOfTLSCallback) {
22 if (
bin->optional_header->SizeOfImage) {
24 if (rva_callback >
bin->optional_header->SizeOfImage) {
37 callbacks +=
sizeof(addressOfTLSCallback);
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len key
RZ_API char * sdb_fmt(const char *fmt,...)
RZ_API int sdb_num_set(Sdb *s, const char *key, ut64 v, ut32 cas)
#define RZ_BUF_READ_PE_DWORD_AT
References bin_pe_rva_to_paddr(), bin_pe_va_to_rva(), count, key, PE_, PE_DWord, RZ_BUF_READ_PE_DWORD_AT, RZ_LOG_INFO, sdb_fmt(), and sdb_num_set().
Referenced by bin_pe_init_tls().
◆ read_tls_directory()
static int read_tls_directory |
( |
RzBuffer * |
b, |
|
|
ut64 |
addr, |
|
|
PE_(image_tls_directory) * |
tls_directory |
|
) |
| |
|
static |
Definition at line 50 of file pe_tls.c.
68 return sizeof(
PE_(image_tls_directory));
static bool read_tls_directory_aux(RzBuffer *b, PE_(image_tls_directory) *tls_directory)
RZ_API st64 rz_buf_seek(RZ_NONNULL RzBuffer *b, st64 addr, int whence)
Modify the current cursor position in the buffer.
References addr, b, PE_, read_tls_directory_aux(), RZ_BUF_CUR, rz_buf_seek(), RZ_BUF_SET, st64, and autogen_x86imm::tmp.
Referenced by bin_pe_init_tls().
◆ read_tls_directory_aux()
static bool read_tls_directory_aux |
( |
RzBuffer * |
b, |
|
|
PE_(image_tls_directory) * |
tls_directory |
|
) |
| |
|
static |