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 "../format/mach0/mach0.h"
#include "../format/mach0/mach0_defines.h"
Go to the source code of this file.
Classes | |
struct | _RSepHdr64 |
struct | _RSepApp64 |
struct | _RSepMachoInfo |
struct | _RSepSlice64 |
struct | _RSepXtr64Ctx |
Macros | |
#define | RZ_BIN_MACH064 1 |
#define | BTW(val, min, max) ((val) > min && (val) < max) |
Typedefs | |
typedef struct _RSepHdr64 | RSepHdr64 |
typedef struct _RSepApp64 | RSepApp64 |
typedef struct _RSepMachoInfo | RSepMachoInfo |
typedef struct _RSepSlice64 | RSepSlice64 |
typedef struct _RSepXtr64Ctx | RSepXtr64Ctx |
Functions | |
static RSepXtr64Ctx * | sep64_xtr_ctx_new (RzBuffer *buf) |
static void | sep64_xtr_ctx_free (void *p) |
static RSepSlice64 * | sep64_xtr_ctx_get_slice (RSepXtr64Ctx *ctx, RzBuffer *whole, int idx) |
static RSepMachoInfo * | mach0_info_new (RzBuffer *buf, ut64 at, ut64 max_size) |
static void | mach0_info_free (RSepMachoInfo *info) |
static bool | read_arm64_ins (RzBuffer *b, int idx, ut64 *result) |
static char * | get_proper_name (const char *app_name) |
static RzBuffer * | extract_slice (RzBuffer *whole, RSepMachoInfo *info) |
static void | fill_metadata_info_from_hdr (RzBinXtrMetadata *meta, struct MACH0_(mach_header) *hdr) |
static bool | check_buffer (RzBuffer *b) |
static bool | load (RzBin *bin) |
static void | destroy (RzBin *bin) |
static int | size (RzBin *bin) |
static RzBinXtrData * | oneshot_buffer (RzBin *bin, RzBuffer *b, int idx) |
static RzList * | oneshotall_buffer (RzBin *bin, RzBuffer *b) |
Variables | |
RzBinXtrPlugin | rz_bin_xtr_plugin_xtr_sep64 |
RZ_API RzLibStruct | rizin_plugin |
Definition at line 92 of file bin_xtr_sep64.c.
#define RZ_BIN_MACH064 1 |
Definition at line 10 of file bin_xtr_sep64.c.
typedef struct _RSepApp64 RSepApp64 |
typedef struct _RSepHdr64 RSepHdr64 |
typedef struct _RSepMachoInfo RSepMachoInfo |
typedef struct _RSepSlice64 RSepSlice64 |
typedef struct _RSepXtr64Ctx RSepXtr64Ctx |
Definition at line 94 of file bin_xtr_sep64.c.
References adr(), b, read_arm64_ins(), rz_buf_read_le64_at, rz_buf_size(), rz_return_val_if_fail, size(), autogen_x86imm::tmp, and ut64().
|
static |
Definition at line 174 of file bin_xtr_sep64.c.
References sep64_xtr_ctx_free().
|
static |
Definition at line 461 of file bin_xtr_sep64.c.
References free(), info(), malloc(), NULL, rz_buf_new_with_pointers(), rz_buf_read_at(), and ut64().
Referenced by sep64_xtr_ctx_get_slice().
|
inlinestatic |
Definition at line 483 of file bin_xtr_sep64.c.
References rz_bin_xtr_metadata_t::arch, rz_bin_xtr_metadata_t::bits, get_bits_from_hdr(), get_cpusubtype_from_hdr(), get_cputype_from_hdr(), get_filetype_from_hdr(), MACH0_, rz_bin_xtr_metadata_t::machine, strdup(), and rz_bin_xtr_metadata_t::type.
Referenced by sep64_xtr_ctx_get_slice().
|
static |
Definition at line 490 of file bin_xtr_sep64.c.
References calloc(), i, and NULL.
Referenced by sep64_xtr_ctx_get_slice().
Definition at line 170 of file bin_xtr_sep64.c.
References bin::buf, NULL, and sep64_xtr_ctx_new().
|
static |
Definition at line 452 of file bin_xtr_sep64.c.
References free(), and info().
Referenced by sep64_xtr_ctx_get_slice().
|
static |
Definition at line 376 of file bin_xtr_sep64.c.
References BTW, cmd, commands, test_evm::end, free(), i, LC_SEGMENT_64, malloc(), MH_MAGIC_64, NULL, rz_buf_read_at(), RZ_NEW0, rz_return_val_if_fail, and ut64().
Referenced by sep64_xtr_ctx_get_slice().
|
static |
Definition at line 183 of file bin_xtr_sep64.c.
References b, _RSepSlice64::buf, free(), setup::idx, _RSepSlice64::meta, _RSepSlice64::nominal_offset, NULL, rz_bin_xtrdata_new(), rz_buf_free(), rz_return_val_if_fail, sep64_xtr_ctx_get_slice(), sep64_xtr_ctx_new(), and _RSepSlice64::total_size.
Referenced by oneshotall_buffer().
Definition at line 199 of file bin_xtr_sep64.c.
References b, rz_bin_xtr_extract_t::file_count, i, NULL, oneshot_buffer(), rz_bin_xtrdata_free(), rz_list_append(), and rz_list_newf().
Definition at line 508 of file bin_xtr_sep64.c.
References b, setup::idx, rz_buf_read_le32_at, and autogen_x86imm::tmp.
Referenced by check_buffer().
|
static |
|
static |
Definition at line 284 of file bin_xtr_sep64.c.
References rz_bin_xtr_metadata_t::arch, rz_bin_xtr_metadata_t::bits, _RSepSlice64::buf, extract_slice(), fill_metadata_info_from_hdr(), free(), get_proper_name(), setup::idx, info(), rz_bin_xtr_metadata_t::libname, mach0_info_free(), mach0_info_new(), rz_bin_xtr_metadata_t::machine, _RSepSlice64::meta, name, _RSepSlice64::nominal_offset, NULL, rz_buf_free(), rz_buf_new_slice(), rz_buf_size(), RZ_NEW0, strdup(), _RSepSlice64::total_size, rz_bin_xtr_metadata_t::type, ut64(), and rz_bin_xtr_metadata_t::xtr_type.
Referenced by oneshot_buffer().
|
static |
Definition at line 219 of file bin_xtr_sep64.c.
References free(), _RSepHdr64::n_apps, NULL, rz_buf_fread_at(), rz_buf_read_le64_at, RZ_NEW0, RZ_NEWS0, ut64(), and UT64_MAX.
Referenced by load(), and oneshot_buffer().
Definition at line 178 of file bin_xtr_sep64.c.
Referenced by check_buffer().
RZ_API RzLibStruct rizin_plugin |
Definition at line 534 of file bin_xtr_sep64.c.
RzBinXtrPlugin rz_bin_xtr_plugin_xtr_sep64 |
Definition at line 520 of file bin_xtr_sep64.c.