Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | rz_dyld_rebase_info_t |
struct | rz_dyld_rebase_infos_entry_t |
struct | rz_dyld_rebase_infos_t |
struct | rz_dyld_rebase_info_3_t |
struct | rz_dyld_rebase_info_2_t |
struct | rz_dyld_rebase_info_1_t |
struct | rz_dyld_loc_sym_t |
struct | rz_bin_dyld_image_t |
struct | rz_dyldcache_t |
Macros | |
#define | RZ_BIN_MACH064 1 |
Typedefs | |
typedef struct rz_dyld_rebase_info_t | RzDyldRebaseInfo |
typedef struct rz_dyld_rebase_infos_entry_t | RzDyldRebaseInfosEntry |
typedef struct rz_dyld_rebase_infos_t | RzDyldRebaseInfos |
typedef struct rz_dyld_rebase_info_3_t | RzDyldRebaseInfo3 |
typedef struct rz_dyld_rebase_info_2_t | RzDyldRebaseInfo2 |
typedef struct rz_dyld_rebase_info_1_t | RzDyldRebaseInfo1 |
typedef struct rz_dyld_loc_sym_t | RzDyldLocSym |
typedef struct rz_bin_dyld_image_t | RzDyldBinImage |
typedef struct rz_dyldcache_t | RzDyldCache |
Functions | |
RZ_API bool | rz_dyldcache_check_magic (const char *magic) |
RZ_API RzDyldCache * | rz_dyldcache_new_buf (RzBuffer *buf) |
RZ_API void | rz_dyldcache_free (RzDyldCache *cache) |
RZ_API ut64 | rz_dyldcache_va2pa (RzDyldCache *cache, uint64_t vaddr, ut32 *offset, ut32 *left) |
RZ_API ut64 | rz_dyldcache_get_slide (RzDyldCache *cache) |
RZ_API objc_cache_opt_info * | rz_dyldcache_get_objc_opt_info (RzBinFile *bf, RzDyldCache *cache) |
RZ_API void | rz_dyldcache_symbols_from_locsym (RzDyldCache *cache, RzDyldBinImage *bin, RzList *symbols, SetU *hash) |
RZ_API RzBuffer * | rz_dyldcache_new_rebasing_buf (RzDyldCache *cache) |
RZ_API bool | rz_dyldcache_needs_rebasing (RzDyldCache *cache) |
RZ_API bool | rz_dyldcache_range_needs_rebasing (RzDyldCache *cache, ut64 paddr, ut64 size) |
#define RZ_BIN_MACH064 1 |
Definition at line 11 of file dyldcache.h.
typedef struct rz_bin_dyld_image_t RzDyldBinImage |
typedef struct rz_dyldcache_t RzDyldCache |
typedef struct rz_dyld_loc_sym_t RzDyldLocSym |
typedef struct rz_dyld_rebase_info_t RzDyldRebaseInfo |
typedef struct rz_dyld_rebase_info_1_t RzDyldRebaseInfo1 |
typedef struct rz_dyld_rebase_info_2_t RzDyldRebaseInfo2 |
typedef struct rz_dyld_rebase_info_3_t RzDyldRebaseInfo3 |
typedef struct rz_dyld_rebase_infos_t RzDyldRebaseInfos |
typedef struct rz_dyld_rebase_infos_entry_t RzDyldRebaseInfosEntry |
magic | zero-terminated string from the beginning of some file |
Definition at line 18 of file dyldcache.c.
Referenced by check_buffer(), and read_cache_header().
RZ_API void rz_dyldcache_free | ( | RzDyldCache * | cache | ) |
Definition at line 1325 of file dyldcache.c.
References rz_dyldcache_t::accel, rz_dyldcache_t::bins, rz_dyldcache_t::buf, rz_dyld_rebase_infos_t::entries, free(), rz_dyldcache_t::hdr, rz_dyldcache_t::hdr_offset, i, rz_dyld_rebase_infos_entry_t::info, rz_dyld_rebase_infos_t::length, rz_dyldcache_t::locsym, rz_dyldcache_t::maps, rz_dyldcache_t::maps_index, NULL, rz_dyldcache_t::oi, rebase_info_free(), rz_dyldcache_t::rebase_infos, rz_buf_free(), RZ_FREE, and rz_list_free().
Referenced by destroy(), and rz_dyldcache_new_buf().
RZ_API objc_cache_opt_info* rz_dyldcache_get_objc_opt_info | ( | RzBinFile * | bf, |
RzDyldCache * | cache | ||
) |
Definition at line 247 of file dyldcache.c.
References addr, rz_dyldcache_t::bins, rz_dyldcache_t::buf, check, get_sections(), i, MACH0_, mach0_free(), rz_dyldcache_t::maps, rz_dyldcache_t::n_maps, NULL, rz_bin_file_t::rbin, rz_buf_read_le64_at, rz_dyldcache_get_slide(), RZ_FREE, RZ_NEW0, sections(), objc_cache_opt_info::sel_string_base, ut64(), va2pa(), and rz_bin_t::verbose.
Referenced by classes().
RZ_API ut64 rz_dyldcache_get_slide | ( | RzDyldCache * | cache | ) |
Definition at line 1097 of file dyldcache.c.
References rz_dyld_rebase_infos_t::entries, i, rz_dyld_rebase_infos_entry_t::info, rz_dyld_rebase_infos_t::length, rz_dyldcache_t::rebase_infos, rz_return_val_if_fail, and rz_dyld_rebase_info_t::slide.
Referenced by header(), maps(), rz_dyldcache_get_objc_opt_info(), rz_dyldcache_needs_rebasing(), rz_dyldcache_symbols_from_locsym(), rz_dyldcache_va2pa(), sections(), and symbols().
RZ_API bool rz_dyldcache_needs_rebasing | ( | RzDyldCache * | cache | ) |
Definition at line 284 of file dyldcache_rebase.c.
References rz_dyldcache_t::rebase_infos, rz_dyldcache_get_slide(), and rz_return_val_if_fail.
Referenced by classes(), rz_dyldcache_range_needs_rebasing(), and virtual_files().
RZ_API RzDyldCache* rz_dyldcache_new_buf | ( | RzBuffer * | buf | ) |
Definition at line 1170 of file dyldcache.c.
References rz_dyldcache_t::accel, rz_dyldcache_t::bins, rz_dyldcache_t::buf, create_cache_bins(), get_rebase_infos(), rz_dyldcache_t::hdr, rz_dyldcache_t::locsym, rz_dyldcache_t::magic, rz_dyldcache_t::maps, memcpy(), NULL, populate_cache_headers(), populate_cache_maps(), read_cache_accel(), rz_dyldcache_t::rebase_infos, rz_buf_ref(), rz_dyld_locsym_new(), rz_dyldcache_free(), and RZ_NEW0.
Referenced by load_buffer().
RZ_API RzBuffer* rz_dyldcache_new_rebasing_buf | ( | RzDyldCache * | cache | ) |
Definition at line 279 of file dyldcache_rebase.c.
References buf_methods, NULL, rz_buf_new_with_methods(), and rz_return_val_if_fail.
Referenced by classes(), and virtual_files().
RZ_API bool rz_dyldcache_range_needs_rebasing | ( | RzDyldCache * | cache, |
ut64 | paddr, | ||
ut64 | size | ||
) |
Definition at line 294 of file dyldcache_rebase.c.
References rebase_info_by_range(), rz_dyldcache_t::rebase_infos, rz_dyldcache_needs_rebasing(), and rz_return_val_if_fail.
Referenced by maps().
RZ_API void rz_dyldcache_symbols_from_locsym | ( | RzDyldCache * | cache, |
RzDyldBinImage * | bin, | ||
RzList * | symbols, | ||
SetU * | hash | ||
) |
Definition at line 1113 of file dyldcache.c.
References rz_dyldcache_t::buf, free(), k, rz_dyld_loc_sym_t::local_symbols_offset, rz_dyldcache_t::locsym, MACH0_, rz_dyldcache_t::maps, rz_dyldcache_t::n_maps, nlist::n_strx, nlist::n_value, rz_bin_symbol_t::name, rz_dyld_loc_sym_t::nlists_count, rz_dyld_loc_sym_t::nlists_offset, NULL, rz_bin_symbol_t::paddr, rz_buf_fread_at(), rz_buf_get_string(), rz_dyldcache_get_slide(), rz_list_append(), RZ_LOG_ERROR, RZ_NEW0, RZ_NEWS0, rz_str_newf(), set_u_add(), set_u_contains(), rz_dyld_loc_sym_t::strings_offset, rz_dyld_loc_sym_t::strings_size, symbols(), rz_bin_symbol_t::type, ut64(), va2pa(), and rz_bin_symbol_t::vaddr.
Referenced by symbols().
Definition at line 1353 of file dyldcache.c.
References rz_dyldcache_t::buf, rz_dyldcache_t::maps, rz_dyldcache_t::n_maps, rz_dyldcache_get_slide(), rz_return_val_if_fail, ut64(), UT64_MAX, and va2pa().
Referenced by bin_obj_va2pa(), classes(), and sections_from_bin().