Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Functions | |
RZ_API bool | rz_coff_supported_arch (const ut8 *buf) |
RZ_API ut64 | rz_coff_perms_from_section_flags (ut32 flags) |
RZ_API char * | rz_coff_symbol_name (struct rz_bin_coff_obj *obj, void *ptr) |
static int | rz_coff_rebase_sym (struct rz_bin_coff_obj *obj, RzBinAddr *addr, struct coff_symbol *sym) |
RZ_API RzBinAddr * | rz_coff_get_entry (struct rz_bin_coff_obj *obj) |
static bool | rz_bin_coff_init_hdr (struct rz_bin_coff_obj *obj) |
static bool | rz_bin_coff_init_opt_hdr (struct rz_bin_coff_obj *obj) |
static bool | rz_bin_coff_init_scn_hdr (struct rz_bin_coff_obj *obj) |
static bool | rz_bin_coff_init_symtable (struct rz_bin_coff_obj *obj) |
static bool | rz_bin_coff_init_scn_va (struct rz_bin_coff_obj *obj) |
static int | rz_bin_coff_init (struct rz_bin_coff_obj *obj, RzBuffer *buf, bool verbose) |
RZ_API void | rz_bin_coff_free (struct rz_bin_coff_obj *obj) |
RZ_API struct rz_bin_coff_obj * | rz_bin_coff_new_buf (RzBuffer *buf, bool verbose) |
RZ_API void rz_bin_coff_free | ( | struct rz_bin_coff_obj * | obj | ) |
Definition at line 266 of file coff.c.
References rz_bin_coff_obj::b, rz_bin_coff_obj::buf_patched, free(), rz_bin_coff_obj::imp_ht, rz_bin_coff_obj::imp_index, rz_buf_free(), rz_bin_coff_obj::scn_hdrs, rz_bin_coff_obj::scn_va, rz_bin_coff_obj::sym_ht, and rz_bin_coff_obj::symbols.
Referenced by destroy().
|
static |
Definition at line 239 of file coff.c.
References rz_bin_coff_obj::b, rz_bin_coff_obj::imp_ht, rz_bin_coff_obj::imp_index, rz_bin_coff_init_hdr(), rz_bin_coff_init_opt_hdr(), rz_bin_coff_init_scn_hdr(), rz_bin_coff_init_scn_va(), rz_bin_coff_init_symtable(), rz_buf_ref(), rz_buf_size(), RZ_LOG_ERROR, rz_bin_coff_obj::size, rz_bin_coff_obj::sym_ht, verbose, and rz_bin_coff_obj::verbose.
Referenced by rz_bin_coff_new_buf().
|
static |
Definition at line 136 of file coff.c.
References rz_bin_coff_obj::b, COFF_FILE_MACHINE_AMD29KBE, COFF_FILE_MACHINE_H8300, COFF_FILE_TI_COFF, COFF_IS_BIG_ENDIAN, COFF_IS_LITTLE_ENDIAN, rz_bin_coff_obj::endian, rz_bin_coff_obj::hdr, rz_buf_fread(), rz_buf_fread_at(), rz_buf_read_le16_at, and rz_bin_coff_obj::target_id.
Referenced by rz_bin_coff_init().
|
static |
Definition at line 164 of file coff.c.
References rz_bin_coff_obj::b, rz_bin_coff_obj::endian, rz_bin_coff_obj::hdr, rz_bin_coff_obj::opt_hdr, and rz_buf_fread_at().
Referenced by rz_bin_coff_init().
|
static |
Definition at line 177 of file coff.c.
References rz_bin_coff_obj::b, calloc(), COFF_FILE_TI_COFF, rz_bin_coff_obj::endian, rz_bin_coff_obj::hdr, if(), rz_buf_fread_at(), RZ_FREE, rz_bin_coff_obj::scn_hdrs, rz_bin_coff_obj::size, and ut64().
Referenced by rz_bin_coff_init().
|
static |
Definition at line 224 of file coff.c.
References rz_bin_coff_obj::hdr, i, RZ_NEWS, RZ_ROUND, rz_bin_coff_obj::scn_hdrs, rz_bin_coff_obj::scn_va, and ut64().
Referenced by rz_bin_coff_init().
|
static |
Definition at line 199 of file coff.c.
References rz_bin_coff_obj::b, calloc(), rz_bin_coff_obj::endian, rz_bin_coff_obj::hdr, rz_buf_fread_at(), RZ_FREE, rz_bin_coff_obj::size, rz_bin_coff_obj::symbols, and ut64().
Referenced by rz_bin_coff_init().
RZ_API struct rz_bin_coff_obj* rz_bin_coff_new_buf | ( | RzBuffer * | buf, |
bool | verbose | ||
) |
Definition at line 278 of file coff.c.
References rz_bin_coff_init(), RZ_NEW0, and verbose.
Referenced by load_buffer().
RZ_API RzBinAddr* rz_coff_get_entry | ( | struct rz_bin_coff_obj * | obj | ) |
Definition at line 89 of file coff.c.
References addr, COFF_SCN_MEM_EXECUTE, free(), rz_bin_coff_obj::hdr, i, NULL, rz_bin_coff_obj::opt_hdr, rz_coff_rebase_sym(), RZ_NEW0, rz_bin_coff_obj::scn_hdrs, and rz_bin_coff_obj::symbols.
Referenced by entries().
Definition at line 36 of file coff.c.
References COFF_SCN_MEM_EXECUTE, COFF_SCN_MEM_READ, COFF_SCN_MEM_WRITE, flags, r, RZ_PERM_R, RZ_PERM_W, and RZ_PERM_X.
Referenced by maps(), and sections().
|
static |
Definition at line 79 of file coff.c.
References addr, rz_bin_coff_obj::hdr, and rz_bin_coff_obj::scn_hdrs.
Referenced by rz_coff_get_entry().
Definition at line 9 of file coff.c.
References arch, COFF_FILE_MACHINE_AMD29KBE, COFF_FILE_MACHINE_AMD29KLE, COFF_FILE_MACHINE_AMD64, COFF_FILE_MACHINE_ARM, COFF_FILE_MACHINE_ARM64, COFF_FILE_MACHINE_ARMNT, COFF_FILE_MACHINE_H8300, COFF_FILE_MACHINE_I386, COFF_FILE_MACHINE_MIPS16, COFF_FILE_MACHINE_MIPSFPU, COFF_FILE_MACHINE_MIPSFPU16, COFF_FILE_MACHINE_R4000, COFF_FILE_MACHINE_SH3, COFF_FILE_MACHINE_SH3DSP, COFF_FILE_MACHINE_SH4, COFF_FILE_MACHINE_SH5, COFF_FILE_MACHINE_THUMB, COFF_FILE_TI_COFF, and rz_read_le16().
Referenced by check_buffer().
RZ_API char* rz_coff_symbol_name | ( | struct rz_bin_coff_obj * | obj, |
void * | ptr | ||
) |
Definition at line 50 of file coff.c.
References rz_bin_coff_obj::b, rz_bin_coff_obj::hdr, len, n, p, rz_buf_read_at(), rz_str_ndup(), rz_bin_coff_obj::size, and strdup().
Referenced by _fill_bin_import(), _fill_bin_symbol(), maps(), and sections().