Rizin
unix-like reverse engineering framework and cli tools
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <rz_types.h>
#include <rz_util.h>
#include "te_specs.h"
#include "te.h"
Go to the source code of this file.
Macros | |
#define | macro_str(s) #s |
#define | rz_buf_read_le8_at(a, b, c) (rz_buf_read_at(a, b, (ut8 *)c, sizeof(ut8)) == 1) |
#define | parse_header_value(off, bits, key) |
void* rz_bin_te_free | ( | struct rz_bin_te_obj_t * | bin | ) |
Definition at line 431 of file te.c.
References free(), NULL, and rz_buf_free().
Referenced by destroy(), rz_bin_te_new(), and rz_bin_te_new_buf().
char* rz_bin_te_get_arch | ( | struct rz_bin_te_obj_t * | bin | ) |
Definition at line 167 of file te.c.
References arch, NULL, strdup(), TE_IMAGE_FILE_MACHINE_ALPHA, TE_IMAGE_FILE_MACHINE_ALPHA64, TE_IMAGE_FILE_MACHINE_ARM, TE_IMAGE_FILE_MACHINE_M68K, TE_IMAGE_FILE_MACHINE_MIPS16, TE_IMAGE_FILE_MACHINE_MIPSFPU, TE_IMAGE_FILE_MACHINE_MIPSFPU16, TE_IMAGE_FILE_MACHINE_POWERPC, TE_IMAGE_FILE_MACHINE_POWERPCFP, TE_IMAGE_FILE_MACHINE_THUMB, and TE_IMAGE_FILE_MACHINE_WCEMIPSV2.
Referenced by info().
int rz_bin_te_get_bits | ( | struct rz_bin_te_obj_t * | bin | ) |
RzBinAddr* rz_bin_te_get_entrypoint | ( | struct rz_bin_te_obj_t * | bin | ) |
Definition at line 204 of file te.c.
References malloc(), NULL, rz_bin_te_get_stripped_delta(), and rz_bin_te_vaddr_to_paddr().
Referenced by entries(), and rz_bin_te_get_main_paddr().
ut64 rz_bin_te_get_image_base | ( | struct rz_bin_te_obj_t * | bin | ) |
char* rz_bin_te_get_machine | ( | struct rz_bin_te_obj_t * | bin | ) |
Definition at line 229 of file te.c.
References NULL, strdup(), TE_IMAGE_FILE_MACHINE_ALPHA, TE_IMAGE_FILE_MACHINE_ALPHA64, TE_IMAGE_FILE_MACHINE_AM33, TE_IMAGE_FILE_MACHINE_AMD64, TE_IMAGE_FILE_MACHINE_ARM, TE_IMAGE_FILE_MACHINE_CEE, TE_IMAGE_FILE_MACHINE_CEF, TE_IMAGE_FILE_MACHINE_EBC, TE_IMAGE_FILE_MACHINE_I386, TE_IMAGE_FILE_MACHINE_IA64, TE_IMAGE_FILE_MACHINE_M32R, TE_IMAGE_FILE_MACHINE_M68K, TE_IMAGE_FILE_MACHINE_MIPS16, TE_IMAGE_FILE_MACHINE_MIPSFPU, TE_IMAGE_FILE_MACHINE_MIPSFPU16, TE_IMAGE_FILE_MACHINE_POWERPC, TE_IMAGE_FILE_MACHINE_POWERPCFP, TE_IMAGE_FILE_MACHINE_R10000, TE_IMAGE_FILE_MACHINE_R3000, TE_IMAGE_FILE_MACHINE_R4000, TE_IMAGE_FILE_MACHINE_SH3, TE_IMAGE_FILE_MACHINE_SH3DSP, TE_IMAGE_FILE_MACHINE_SH3E, TE_IMAGE_FILE_MACHINE_SH4, TE_IMAGE_FILE_MACHINE_SH5, TE_IMAGE_FILE_MACHINE_THUMB, TE_IMAGE_FILE_MACHINE_TRICORE, and TE_IMAGE_FILE_MACHINE_WCEMIPSV2.
Referenced by info().
ut64 rz_bin_te_get_main_paddr | ( | struct rz_bin_te_obj_t * | bin | ) |
Definition at line 95 of file te.c.
References addr, delta, eprintf, free(), rz_bin_te_get_entrypoint(), rz_buf_read_at(), ut64(), and UT64_MAX.
Referenced by binsym().
char* rz_bin_te_get_os | ( | struct rz_bin_te_obj_t * | bin | ) |
Definition at line 325 of file te.c.
References NULL, strdup(), TE_IMAGE_SUBSYSTEM_EFI_APPLICATION, TE_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER, TE_IMAGE_SUBSYSTEM_EFI_ROM, TE_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER, TE_IMAGE_SUBSYSTEM_NATIVE, TE_IMAGE_SUBSYSTEM_POSIX_CUI, TE_IMAGE_SUBSYSTEM_WINDOWS_CE_GUI, TE_IMAGE_SUBSYSTEM_WINDOWS_CUI, TE_IMAGE_SUBSYSTEM_WINDOWS_GUI, and TE_IMAGE_SUBSYSTEM_XBOX.
Referenced by info().
struct rz_bin_te_section_t* rz_bin_te_get_sections | ( | struct rz_bin_te_obj_t * | bin | ) |
Definition at line 359 of file te.c.
References calloc(), TE_image_section_header::Characteristics, i, memcpy(), NULL, TE_image_section_header::PointerToRawData, rz_bin_te_get_stripped_delta(), sections(), TE_image_section_header::SizeOfRawData, TE_IMAGE_SIZEOF_NAME, TE_image_section_header::VirtualAddress, and TE_image_section_header::VirtualSize.
Referenced by sections().
ut64 rz_bin_te_get_stripped_delta | ( | struct rz_bin_te_obj_t * | bin | ) |
Definition at line 14 of file te.c.
Referenced by rz_bin_te_get_entrypoint(), and rz_bin_te_get_sections().
char* rz_bin_te_get_subsystem | ( | struct rz_bin_te_obj_t * | bin | ) |
Definition at line 388 of file te.c.
References NULL, strdup(), TE_IMAGE_SUBSYSTEM_EFI_APPLICATION, TE_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER, TE_IMAGE_SUBSYSTEM_EFI_ROM, TE_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER, TE_IMAGE_SUBSYSTEM_NATIVE, TE_IMAGE_SUBSYSTEM_POSIX_CUI, TE_IMAGE_SUBSYSTEM_WINDOWS_CE_GUI, TE_IMAGE_SUBSYSTEM_WINDOWS_CUI, TE_IMAGE_SUBSYSTEM_WINDOWS_GUI, and TE_IMAGE_SUBSYSTEM_XBOX.
Referenced by info().
|
static |
Definition at line 152 of file te.c.
References eprintf, NULL, rz_bin_te_init_hdr(), and rz_bin_te_init_sections().
Referenced by rz_bin_te_new(), and rz_bin_te_new_buf().
|
static |
Definition at line 33 of file te.c.
References malloc(), parse_header_value, RZ_LOG_ERROR, sdb_num_set(), sdb_set(), and ut64().
Referenced by rz_bin_te_init().
|
static |
Definition at line 134 of file te.c.
References eprintf, if(), malloc(), and rz_buf_read_at().
Referenced by rz_bin_te_init().
struct rz_bin_te_obj_t* rz_bin_te_new | ( | const char * | file | ) |
Definition at line 442 of file te.c.
References file, free(), NULL, rz_bin_te_free(), rz_bin_te_init(), rz_buf_new_with_bytes(), rz_buf_set_bytes(), rz_file_slurp(), and RZ_NEW0.
struct rz_bin_te_obj_t* rz_bin_te_new_buf | ( | RzBuffer * | buf | ) |
Definition at line 466 of file te.c.
References NULL, rz_bin_te_free(), rz_bin_te_init(), rz_buf_new_with_buf(), rz_buf_size(), RZ_NEW0, and sdb_new0().
Referenced by load_buffer().
|
static |