Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Typedefs | |
typedef void(* | RelocsForeachCb) (RZ_BORROW RzBinReloc *reloc, ut8 *patch_buf, size_t patch_buf_sz, void *user) |
Functions | |
RZ_API ut64 | rz_coff_get_reloc_targets_map_base (struct rz_bin_coff_obj *obj) |
base vaddr where to map the artificial reloc target vfile More... | |
RZ_API ut64 | rz_coff_import_index_addr (struct rz_bin_coff_obj *obj, ut64 imp_index) |
static void | relocs_foreach (struct rz_bin_coff_obj *bin, RelocsForeachCb cb, void *user) |
void | get_relocs_list_cb (RZ_BORROW RzBinReloc *reloc, ut8 *patch_buf, size_t patch_buf_sz, void *user) |
RZ_API RzList * | rz_coff_get_relocs (struct rz_bin_coff_obj *bin) |
RZ_API ut64 | rz_coff_get_reloc_targets_vfile_size (struct rz_bin_coff_obj *obj) |
size of the artificial reloc target vfile More... | |
static void | patch_reloc_cb (RZ_BORROW RzBinReloc *reloc, ut8 *patch_buf, size_t patch_buf_sz, void *user) |
RZ_API RZ_BORROW RzBuffer * | rz_coff_get_patched_buf (struct rz_bin_coff_obj *bin) |
typedef void(* RelocsForeachCb) (RZ_BORROW RzBinReloc *reloc, ut8 *patch_buf, size_t patch_buf_sz, void *user) |
Definition at line 36 of file coff_reloc.c.
void get_relocs_list_cb | ( | RZ_BORROW RzBinReloc * | reloc, |
ut8 * | patch_buf, | ||
size_t | patch_buf_sz, | ||
void * | user | ||
) |
Definition at line 185 of file coff_reloc.c.
References memcpy(), r, rz_list_push(), and RZ_NEW.
Referenced by rz_coff_get_relocs().
|
static |
Definition at line 212 of file coff_reloc.c.
References rz_buf_write_at().
Referenced by rz_coff_get_patched_buf().
|
static |
Definition at line 38 of file coff_reloc.c.
References rz_bin_reloc_t::addend, rz_bin_reloc_t::additive, calloc(), cb, COFF_FILE_MACHINE_AMD64, COFF_FILE_MACHINE_ARM64, COFF_FILE_MACHINE_ARMNT, COFF_FILE_MACHINE_I386, COFF_REL_AMD64_REL32, COFF_REL_ARM64_BRANCH26, COFF_REL_ARM_BLX23T, COFF_REL_ARM_BRANCH24T, COFF_REL_I386_DIR32, COFF_REL_I386_REL32, dst, free(), i, rz_bin_reloc_t::import, rz_bin_symbol_t::is_imported, NULL, rz_bin_reloc_t::paddr, RZ_BIN_RELOC_32, rz_buf_read_le16_at, rz_buf_read_le16_offset, rz_buf_read_le32_at, rz_buf_read_le32_offset, rz_coff_import_index_addr(), coff_reloc::rz_symndx, coff_reloc::rz_type, coff_reloc::rz_vaddr, rz_write_le16(), rz_write_le32(), st32, rz_bin_reloc_t::symbol, rz_bin_reloc_t::target_vaddr, rz_bin_reloc_t::type, ut64(), rz_bin_symbol_t::vaddr, and rz_bin_reloc_t::vaddr.
Referenced by rz_coff_get_patched_buf(), and rz_coff_get_relocs().
RZ_API RZ_BORROW RzBuffer* rz_coff_get_patched_buf | ( | struct rz_bin_coff_obj * | bin | ) |
Definition at line 219 of file coff_reloc.c.
References NULL, patch_reloc_cb(), relocs_foreach(), rz_buf_new_sparse_overlay(), rz_buf_sparse_set_write_mode(), RZ_BUF_SPARSE_WRITE_MODE_SPARSE, RZ_BUF_SPARSE_WRITE_MODE_THROUGH, and rz_return_val_if_fail.
Referenced by virtual_files().
RZ_API ut64 rz_coff_get_reloc_targets_map_base | ( | struct rz_bin_coff_obj * | obj | ) |
base vaddr where to map the artificial reloc target vfile
Definition at line 9 of file coff_reloc.c.
References rz_bin_coff_obj::hdr, i, max, rz_bin_coff_obj::reloc_targets_map_base, rz_bin_coff_obj::reloc_targets_map_base_calculated, RZ_COFF_RELOC_TARGET_SIZE, rz_num_align_delta(), rz_return_val_if_fail, rz_bin_coff_obj::scn_hdrs, rz_bin_coff_obj::scn_va, ut64(), and val.
Referenced by maps(), and rz_coff_import_index_addr().
RZ_API ut64 rz_coff_get_reloc_targets_vfile_size | ( | struct rz_bin_coff_obj * | obj | ) |
size of the artificial reloc target vfile
Definition at line 206 of file coff_reloc.c.
References count, rz_bin_coff_obj::imp_index, RZ_COFF_RELOC_TARGET_SIZE, rz_return_val_if_fail, and ut64().
Referenced by maps(), and virtual_files().
RZ_API RzList* rz_coff_get_relocs | ( | struct rz_bin_coff_obj * | bin | ) |
Definition at line 195 of file coff_reloc.c.
References free(), get_relocs_list_cb(), NULL, r, relocs_foreach(), rz_list_newf(), and rz_return_val_if_fail.
Referenced by relocs().
RZ_API ut64 rz_coff_import_index_addr | ( | struct rz_bin_coff_obj * | obj, |
ut64 | imp_index | ||
) |
Definition at line 32 of file coff_reloc.c.
References rz_coff_get_reloc_targets_map_base(), and RZ_COFF_RELOC_TARGET_SIZE.
Referenced by _fill_bin_symbol(), and relocs_foreach().