Rizin
unix-like reverse engineering framework and cli tools
dyldcache.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2021 Florian Märkl <info@florianmaerkl.de>
2 // SPDX-FileCopyrightText: 2020 Francesco Tamagni <mrmacete@protonmail.ch>
3 // SPDX-License-Identifier: LGPL-3.0-only
4 
5 #ifndef RZ_BIN_FORMAT_DYLDCACHE_H
6 #define RZ_BIN_FORMAT_DYLDCACHE_H
7 
8 #include <rz_util.h>
9 #include <set.h>
10 
11 #define RZ_BIN_MACH064 1
12 
13 #include "mach0.h"
14 
15 typedef struct rz_dyld_rebase_info_t {
22 
28 
29 typedef struct rz_dyld_rebase_infos_t {
31  size_t length;
33 
34 typedef struct rz_dyld_rebase_info_3_t {
46 
47 typedef struct rz_dyld_rebase_info_2_t {
62 
63 typedef struct rz_dyld_rebase_info_1_t {
74 
75 typedef struct rz_dyld_loc_sym_t {
82 
83 typedef struct rz_bin_dyld_image_t {
84  char *file;
92 
93 typedef struct rz_dyldcache_t {
94  ut8 magic[8];
95 
103 
112 
113 RZ_API bool rz_dyldcache_check_magic(const char *magic);
120 
124 
125 #endif
RzList * symbols(RzBinFile *bf)
Definition: bin_ne.c:102
#define RZ_API
uint16_t ut16
uint32_t ut32
RZ_API ut64 rz_dyldcache_get_slide(RzDyldCache *cache)
Definition: dyldcache.c:1097
RZ_API bool rz_dyldcache_check_magic(const char *magic)
Definition: dyldcache.c:18
RZ_API void rz_dyldcache_symbols_from_locsym(RzDyldCache *cache, RzDyldBinImage *bin, RzList *symbols, SetU *hash)
Definition: dyldcache.c:1113
RZ_API RzBuffer * rz_dyldcache_new_rebasing_buf(RzDyldCache *cache)
struct rz_dyld_rebase_infos_t RzDyldRebaseInfos
RZ_API bool rz_dyldcache_needs_rebasing(RzDyldCache *cache)
RZ_API void rz_dyldcache_free(RzDyldCache *cache)
Definition: dyldcache.c:1325
struct rz_dyld_rebase_info_t RzDyldRebaseInfo
struct rz_dyld_loc_sym_t RzDyldLocSym
struct rz_dyld_rebase_info_2_t RzDyldRebaseInfo2
struct rz_dyld_rebase_info_3_t RzDyldRebaseInfo3
struct rz_bin_dyld_image_t RzDyldBinImage
RZ_API RzDyldCache * rz_dyldcache_new_buf(RzBuffer *buf)
Definition: dyldcache.c:1170
struct rz_dyld_rebase_info_1_t RzDyldRebaseInfo1
RZ_API bool rz_dyldcache_range_needs_rebasing(RzDyldCache *cache, ut64 paddr, ut64 size)
RZ_API ut64 rz_dyldcache_va2pa(RzDyldCache *cache, uint64_t vaddr, ut32 *offset, ut32 *left)
Definition: dyldcache.c:1353
struct rz_dyldcache_t RzDyldCache
RZ_API objc_cache_opt_info * rz_dyldcache_get_objc_opt_info(RzBinFile *bf, RzDyldCache *cache)
Definition: dyldcache.c:247
struct rz_dyld_rebase_infos_entry_t RzDyldRebaseInfosEntry
voidpf void uLong size
Definition: ioapi.h:138
voidpf uLong offset
Definition: ioapi.h:144
voidpf void * buf
Definition: ioapi.h:138
uint8_t ut8
Definition: lh5801.h:11
HtUP SetU
Definition: set.h:22
unsigned long uint64_t
Definition: sftypes.h:28
Definition: malloc.c:26
XX curplugin == o->plugin.
Definition: rz_bin.h:298
ut64 local_symbols_offset
Definition: dyldcache.h:76
Definition: dyldcache.h:23
ut64 start
Definition: dyldcache.h:24
RzDyldRebaseInfo * info
Definition: dyldcache.h:26
ut64 end
Definition: dyldcache.h:25
RzDyldRebaseInfosEntry * entries
Definition: dyldcache.h:30
objc_cache_opt_info * oi
Definition: dyldcache.h:109
ut64 * hdr_offset
Definition: dyldcache.h:97
cache_map_t * maps
Definition: dyldcache.h:101
ut32 * maps_index
Definition: dyldcache.h:99
RzList * bins
Definition: dyldcache.h:104
cache_accel_t * accel
Definition: dyldcache.h:107
ut64 symbols_off_base
Definition: dyldcache.h:98
bool objc_opt_info_loaded
Definition: dyldcache.h:110
ut8 magic[8]
Definition: dyldcache.h:94
cache_hdr_t * hdr
Definition: dyldcache.h:96
RzBuffer * buf
Definition: dyldcache.h:105
RzDyldRebaseInfos * rebase_infos
Definition: dyldcache.h:106
RzDyldLocSym * locsym
Definition: dyldcache.h:108
ut64(WINAPI *w32_GetEnabledXStateFeatures)()