Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_types.h>
#include <rz_list.h>
#include <rz_util.h>
#include <rz_bin.h>
#include "mz_specs.h"
Go to the source code of this file.
Classes | |
struct | rz_bin_mz_segment_t |
struct | rz_bin_mz_reloc_t |
struct | rz_bin_mz_obj_t |
Functions | |
RzBinAddr * | rz_bin_mz_get_entrypoint (const struct rz_bin_mz_obj_t *bin) |
RzList * | rz_bin_mz_get_segments (const struct rz_bin_mz_obj_t *bin) |
struct rz_bin_mz_reloc_t * | rz_bin_mz_get_relocs (const struct rz_bin_mz_obj_t *bin) |
void * | rz_bin_mz_free (struct rz_bin_mz_obj_t *bin) |
struct rz_bin_mz_obj_t * | rz_bin_mz_new (const char *file) |
struct rz_bin_mz_obj_t * | rz_bin_mz_new_buf (RzBuffer *buf) |
RzBinAddr * | rz_bin_mz_get_main_vaddr (struct rz_bin_mz_obj_t *bin) |
void* rz_bin_mz_free | ( | struct rz_bin_mz_obj_t * | bin | ) |
Definition at line 188 of file mz.c.
References free(), NULL, and rz_buf_free().
Referenced by destroy(), rz_bin_mz_new(), and rz_bin_mz_new_buf().
RzBinAddr* rz_bin_mz_get_entrypoint | ( | const struct rz_bin_mz_obj_t * | bin | ) |
Definition at line 16 of file mz.c.
References MZ_image_dos_header::cs, MZ_image_dos_header::ip, NULL, rz_bin_addr_t::paddr, rz_bin_mz_la_to_pa(), rz_bin_mz_va_to_la(), RZ_LOG_ERROR, RZ_NEW0, ut64(), and rz_bin_addr_t::vaddr.
Referenced by entries(), and rz_bin_mz_get_main_vaddr().
RzBinAddr* rz_bin_mz_get_main_vaddr | ( | struct rz_bin_mz_obj_t * | bin | ) |
Definition at line 330 of file mz.c.
References b, free(), n, NULL, PFMT64x, rz_bin_mz_get_entrypoint(), rz_bin_mz_la_to_pa(), rz_bin_mz_va_to_la(), rz_buf_read_at(), RZ_FREE, RZ_LOG_ERROR, rz_read_ble16(), ut64(), and ZERO_FILL.
Referenced by binsym().
struct rz_bin_mz_reloc_t* rz_bin_mz_get_relocs | ( | const struct rz_bin_mz_obj_t * | bin | ) |
Definition at line 163 of file mz.c.
References calloc(), i, NULL, relocs(), rz_bin_mz_la_to_pa(), rz_bin_mz_va_to_la(), RZ_LOG_ERROR, and rz_bin_mz_reloc_t::vaddr.
Referenced by relocs().
RzList* rz_bin_mz_get_segments | ( | const struct rz_bin_mz_obj_t * | bin | ) |
Definition at line 62 of file mz.c.
References c, cmp_sections(), i, NULL, relocs(), rz_bin_mz_init_section(), rz_bin_mz_la_to_pa(), rz_bin_mz_va_to_la(), rz_bin_section_free(), rz_buf_read_le16_at, rz_buf_size(), rz_list_add_sorted(), rz_list_find(), rz_list_free(), rz_list_get_top(), rz_list_newf(), RZ_LOG_ERROR, rz_str_newf(), rz_str_rwx(), section::size, rz_bin_section_t::size, ut64(), rz_bin_section_t::vaddr, and rz_bin_section_t::vsize.
Referenced by sections().
struct rz_bin_mz_obj_t* rz_bin_mz_new | ( | const char * | file | ) |
Definition at line 293 of file mz.c.
References file, free(), NULL, rz_bin_mz_free(), rz_bin_mz_init(), rz_buf_new_with_bytes(), rz_buf_set_bytes(), rz_file_slurp(), and RZ_NEW0.
struct rz_bin_mz_obj_t* rz_bin_mz_new_buf | ( | RzBuffer * | buf | ) |
Definition at line 317 of file mz.c.
References NULL, rz_bin_mz_free(), rz_bin_mz_init(), rz_buf_new_with_buf(), rz_buf_size(), and RZ_NEW0.
Referenced by load().