Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_types.h>
#include <rz_util.h>
#include <rz_lib.h>
#include <rz_bin.h>
#include <ht_uu.h>
#include "coff/coff.h"
Go to the source code of this file.
Macros | |
#define | VFILE_NAME_RELOC_TARGETS "reloc-targets" |
#define | VFILE_NAME_PATCHED "patched" |
#define | DTYPE_IS_FUNCTION(type) (COFF_SYM_GET_DTYPE(type) == COFF_SYM_DTYPE_FUNCTION) |
Variables | |
RzBinPlugin | rz_bin_plugin_coff |
RZ_API RzLibStruct | rizin_plugin |
#define DTYPE_IS_FUNCTION | ( | type | ) | (COFF_SYM_GET_DTYPE(type) == COFF_SYM_DTYPE_FUNCTION) |
Definition at line 51 of file bin_coff.c.
#define VFILE_NAME_PATCHED "patched" |
Definition at line 14 of file bin_coff.c.
#define VFILE_NAME_RELOC_TARGETS "reloc-targets" |
Definition at line 13 of file bin_coff.c.
|
static |
Definition at line 146 of file bin_coff.c.
References rz_bin_import_t::bind, DTYPE_IS_FUNCTION, free(), setup::idx, is_imported_symbol(), rz_bin_import_t::name, NULL, RZ_BIN_TYPE_FUNC_STR, RZ_BIN_TYPE_UNKNOWN_STR, rz_coff_symbol_name(), RZ_NEW0, s, and rz_bin_import_t::type.
Referenced by populate_imports().
|
static |
Definition at line 57 of file bin_coff.c.
References rz_bin_symbol_t::bind, COFF_SYM_CLASS_EXTERNAL, COFF_SYM_CLASS_FILE, COFF_SYM_CLASS_FUNCTION, COFF_SYM_CLASS_LABEL, COFF_SYM_CLASS_SECTION, COFF_SYM_CLASS_STATIC, COFF_SYM_SCNUM_ABS, COFF_SYM_SCNUM_UNDEF, rz_bin_t::constpool, DTYPE_IS_FUNCTION, rz_bin_symbol_t::forwarder, found, free(), setup::idx, rz_bin_symbol_t::is_imported, is_imported_symbol(), rz_bin_symbol_t::name, NULL, rz_bin_symbol_t::ordinal, rz_bin_symbol_t::paddr, RZ_BIN_BIND_GLOBAL_STR, RZ_BIN_BIND_LOCAL_STR, RZ_BIN_TYPE_FILE_STR, RZ_BIN_TYPE_FUNC_STR, RZ_BIN_TYPE_SECTION_STR, RZ_BIN_TYPE_UNKNOWN_STR, rz_coff_import_index_addr(), rz_coff_symbol_name(), rz_str_constpool_get(), rz_str_newf(), s, sdb_fmt(), rz_bin_symbol_t::size, rz_bin_symbol_t::type, ut64(), UT64_MAX, and rz_bin_symbol_t::vaddr.
Referenced by populate_symbols().
Definition at line 43 of file bin_coff.c.
|
static |
Definition at line 505 of file bin_coff.c.
References checks, r, rz_buf_read_at(), rz_coff_supported_arch(), autogen_x86imm::tmp, to, and objdump-m68k::TODO.
|
static |
Definition at line 39 of file bin_coff.c.
References rz_bin_object_t::bin_obj, rz_bin_file_t::o, and rz_bin_coff_free().
Definition at line 170 of file bin_coff.c.
References rz_bin_object_t::bin_obj, free(), if(), NULL, rz_bin_file_t::o, rz_coff_get_entry(), rz_list_append(), and rz_list_newf().
Definition at line 18 of file bin_coff.c.
References rz_bin_object_t::bin_obj, if(), NULL, and rz_bin_file_t::o.
Definition at line 359 of file bin_coff.c.
References rz_bin_object_t::bin_obj, rz_bin_coff_obj::hdr, i, rz_bin_coff_obj::imp_ht, NULL, rz_bin_file_t::o, populate_imports(), rz_bin_import_free(), rz_list_append(), rz_list_newf(), and rz_bin_coff_obj::symbols.
Definition at line 388 of file bin_coff.c.
References rz_bin_info_t::arch, rz_bin_info_t::bclass, rz_bin_info_t::big_endian, rz_bin_object_t::bin_obj, rz_bin_info_t::bits, 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_MACHINE_TMS320C54, COFF_FILE_MACHINE_TMS320C55, COFF_FILE_MACHINE_TMS320C55PLUS, COFF_FILE_TI_COFF, COFF_FLAGS_TI_F_EXEC, COFF_FLAGS_TI_F_LNNO, COFF_FLAGS_TI_F_RELFLG, rz_bin_info_t::cpu, rz_bin_info_t::dbg_info, rz_bin_coff_obj::endian, rz_bin_info_t::file, rz_bin_file_t::file, rz_bin_info_t::has_va, rz_bin_coff_obj::hdr, rz_bin_info_t::machine, NULL, rz_bin_file_t::o, rz_bin_info_t::os, rz_bin_info_t::rclass, RZ_BIN_DBG_LINENUMS, RZ_BIN_DBG_RELOCS, RZ_BIN_DBG_STRIPPED, RZ_BIN_DBG_SYMS, rz_coff_is_stripped(), RZ_NEW0, strdup(), rz_bin_info_t::subsystem, rz_bin_coff_obj::target_id, and rz_bin_info_t::type.
|
static |
Definition at line 53 of file bin_coff.c.
References COFF_SYM_CLASS_EXTERNAL, COFF_SYM_SCNUM_UNDEF, and s.
Referenced by _fill_bin_import(), and _fill_bin_symbol().
Definition at line 379 of file bin_coff.c.
References NULL.
Referenced by get_libs(), rz_bin_demangle(), rz_bin_pe_get_libs(), rz_core_bin_libs_print(), rz_core_bin_load(), and rz_diff_libraries_new().
|
static |
Definition at line 34 of file bin_coff.c.
References rz_bin_object_t::bin_obj, NULL, rz_bin_file_t::rbin, rz_bin_coff_new_buf(), and rz_bin_t::verbose.
Definition at line 224 of file bin_coff.c.
References rz_bin_object_t::bin_obj, rz_bin_coff_obj::hdr, i, map(), rz_bin_map_t::name, NULL, rz_bin_file_t::o, rz_bin_map_t::paddr, rz_bin_map_t::perm, populate_symbols(), rz_bin_map_t::psize, rz_bin_map_free(), rz_coff_get_reloc_targets_map_base(), rz_coff_get_reloc_targets_vfile_size(), rz_coff_perms_from_section_flags(), rz_coff_symbol_name(), rz_list_append(), rz_list_newf(), rz_list_prepend(), RZ_NEW0, RZ_PERM_R, rz_bin_coff_obj::scn_hdrs, rz_bin_coff_obj::scn_va, strdup(), ut64(), rz_bin_map_t::vaddr, rz_bin_map_t::vfile_name, VFILE_NAME_PATCHED, VFILE_NAME_RELOC_TARGETS, and rz_bin_map_t::vsize.
|
static |
Definition at line 303 of file bin_coff.c.
References _fill_bin_import(), rz_bin_coff_obj::hdr, i, rz_bin_coff_obj::imp_ht, rz_bin_coff_obj::imp_index, rz_bin_import_t::ordinal, rz_bin_coff_obj::symbols, and ut64().
Referenced by imports(), and populate_symbols().
|
static |
Definition at line 320 of file bin_coff.c.
References _fill_bin_symbol(), rz_bin_object_t::bin_obj, free(), rz_bin_coff_obj::hdr, i, if(), rz_bin_file_t::o, populate_imports(), rz_bin_file_t::rbin, RZ_NEW0, rz_bin_coff_obj::sym_ht, rz_bin_coff_obj::symbols, and ut64().
Referenced by maps(), relocs(), symbols(), and virtual_files().
Definition at line 383 of file bin_coff.c.
References rz_bin_object_t::bin_obj, rz_bin_file_t::o, populate_symbols(), and rz_coff_get_relocs().
|
static |
Definition at line 30 of file bin_coff.c.
References COFF_FLAGS_TI_F_LNNO, COFF_FLAGS_TI_F_LSYMS, COFF_FLAGS_TI_F_RELFLG, and rz_bin_coff_obj::hdr.
Referenced by info().
Definition at line 273 of file bin_coff.c.
References rz_bin_object_t::bin_obj, rz_bin_coff_obj::hdr, i, rz_bin_section_t::is_data, rz_bin_section_t::name, NULL, rz_bin_file_t::o, rz_bin_section_t::paddr, rz_bin_section_t::perm, rz_bin_section_free(), rz_coff_perms_from_section_flags(), rz_coff_symbol_name(), rz_list_append(), rz_list_newf(), RZ_NEW0, rz_bin_coff_obj::scn_hdrs, rz_bin_coff_obj::scn_va, rz_bin_section_t::size, rz_bin_section_t::vaddr, and rz_bin_section_t::vsize.
Definition at line 501 of file bin_coff.c.
Definition at line 340 of file bin_coff.c.
References rz_bin_object_t::bin_obj, rz_bin_coff_obj::hdr, i, NULL, rz_bin_file_t::o, populate_symbols(), rz_bin_symbol_free(), rz_list_append(), rz_list_newf(), rz_bin_coff_obj::sym_ht, and rz_bin_coff_obj::symbols.
Definition at line 183 of file bin_coff.c.
References rz_bin_object_t::bin_obj, rz_bin_virtual_file_t::buf, rz_bin_virtual_file_t::buf_owned, rz_bin_coff_obj::buf_patched, rz_bin_virtual_file_t::name, NULL, rz_bin_file_t::o, populate_symbols(), r, rz_bin_virtual_file_free(), rz_buf_new_empty(), rz_coff_get_patched_buf(), rz_coff_get_reloc_targets_vfile_size(), rz_list_newf(), rz_list_push(), RZ_NEW0, strdup(), ut64(), VFILE_NAME_PATCHED, and VFILE_NAME_RELOC_TARGETS.
RZ_API RzLibStruct rizin_plugin |
Definition at line 547 of file bin_coff.c.
RzBinPlugin rz_bin_plugin_coff |
Definition at line 523 of file bin_coff.c.