Rizin
unix-like reverse engineering framework and cli tools
bin_nso.c
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2021 Florian Märkl <info@florianmaerkl.de>
2 // SPDX-FileCopyrightText: 2017-2018 rkx1209 <rkx1209dev@gmail.com>
3 // SPDX-License-Identifier: LGPL-3.0-only
4 
5 #include <rz_bin.h>
6 #include "nxo/nxo.h"
7 #include <lz4.h>
8 
9 #define NSO_OFF(x) rz_offsetof(NSOHeader, x)
10 #define NSO_OFFSET_MODMEMOFF rz_offsetof(NXOStart, mod_memoffset)
11 
12 #define VFILE_NAME_DECOMPRESSED "decompressed"
13 
14 // starting at 0
15 typedef struct {
16  ut32 magic; // NSO0
17  ut32 pad0; // 4
18  ut32 pad1; // 8
19  ut32 pad2; // 12
21  ut32 text_loc; // 20
22  ut32 text_size; // 24
23  ut32 pad3; // 28
25  ut32 ro_loc; // 36
26  ut32 ro_size; // 40
27  ut32 pad4; // 44
29  ut32 data_loc; // 52
30  ut32 data_size; // 56
31  ut32 bss_size; // 60
32 } NSOHeader;
33 
34 static ut64 baddr(RzBinFile *bf) {
35  return 0x8000000;
36 }
37 
38 static bool check_buffer(RzBuffer *b) {
39  if (rz_buf_size(b) >= 0x20) {
40  ut8 magic[4];
41  if (rz_buf_read_at(b, 0, magic, sizeof(magic)) != 4) {
42  return false;
43  }
44  return fileType(magic) != NULL;
45  }
46  return false;
47 }
48 
50  return rz_buf_read_le32_at(buf, NSO_OFF(magic), &r->magic) &&
51  rz_buf_read_le32_at(buf, NSO_OFF(pad0), &r->pad0) &&
52  rz_buf_read_le32_at(buf, NSO_OFF(pad1), &r->pad1) &&
53  rz_buf_read_le32_at(buf, NSO_OFF(pad2), &r->pad2) &&
54  rz_buf_read_le32_at(buf, NSO_OFF(text_memoffset), &r->text_memoffset) &&
55  rz_buf_read_le32_at(buf, NSO_OFF(text_loc), &r->text_loc) &&
56  rz_buf_read_le32_at(buf, NSO_OFF(text_size), &r->text_size) &&
57  rz_buf_read_le32_at(buf, NSO_OFF(pad3), &r->pad3) &&
58  rz_buf_read_le32_at(buf, NSO_OFF(ro_memoffset), &r->ro_memoffset) &&
59  rz_buf_read_le32_at(buf, NSO_OFF(ro_loc), &r->ro_loc) &&
60  rz_buf_read_le32_at(buf, NSO_OFF(ro_size), &r->ro_size) &&
61  rz_buf_read_le32_at(buf, NSO_OFF(pad4), &r->pad4) &&
62  rz_buf_read_le32_at(buf, NSO_OFF(data_memoffset), &r->data_memoffset) &&
63  rz_buf_read_le32_at(buf, NSO_OFF(data_loc), &r->data_loc) &&
64  rz_buf_read_le32_at(buf, NSO_OFF(data_size), &r->data_size) &&
65  rz_buf_read_le32_at(buf, NSO_OFF(bss_size), &r->bss_size);
66 }
67 
69  RZ_STATIC_ASSERT(sizeof(NSOHeader) == 64);
70  if (rz_buf_size(buf) < sizeof(NSOHeader)) {
71  return NULL;
72  }
74  if (!r) {
75  return NULL;
76  }
77 
78  if (!parse_header_aux(buf, r)) {
79  free(r);
80  return NULL;
81  }
82 
83  return r;
84 }
85 
88  if (!bin) {
89  return NULL;
90  }
91  bin->header = parse_header(buf);
92  if (!bin->header) {
93  free(bin);
94  return NULL;
95  }
96  return bin;
97 }
98 
99 static void nso_free(RzBinNXOObj *bin) {
100  if (!bin) {
101  return;
102  }
103  rz_buf_free(bin->decompressed);
104  free(bin->header);
105  free(bin);
106 }
107 
108 static bool decompress(RzBuffer *source_buf, ut64 source_offset, ut64 source_size, ut8 *dst_buf, ut64 decompressed_size) {
109  if (!source_size || decompressed_size > (ut64)SIZE_MAX || source_size > (ut64)INT_MAX || decompressed_size > (ut64)INT_MAX) {
110  return false;
111  }
112  ut8 *tmp = RZ_NEWS0(ut8, source_size);
113  if (!tmp) {
114  return false;
115  }
116  if (rz_buf_read_at(source_buf, source_offset, tmp, source_size) != source_size) {
117  free(tmp);
118  return false;
119  }
120  int r = LZ4_decompress_safe((const char *)tmp, (char *)dst_buf, source_size, decompressed_size);
121  free(tmp);
122  return r == decompressed_size;
123 }
124 
125 static bool load_buffer(RzBinFile *bf, RzBinObject *obj, RzBuffer *buf, Sdb *sdb) {
126  rz_return_val_if_fail(bf && buf, false);
128  if (!bin) {
129  return false;
130  }
131  ut8 *tmp = NULL;
132  NSOHeader *hdr = bin->header;
133  if (hdr->ro_memoffset >= rz_buf_size(buf)) {
134  RZ_LOG_ERROR("NSO file smaller than ro section offset\n");
135  goto another_castle;
136  }
137  ut64 total_size = hdr->text_size + hdr->ro_size + hdr->data_size;
138  if (total_size < hdr->text_size) {
139  // Prevent integer overflow
140  goto another_castle;
141  }
142  tmp = RZ_NEWS0(ut8, total_size);
143  if (!tmp) {
144  goto another_castle;
145  }
146  ut64 ba = baddr(bf);
147 
148  /* Decompress each section */
149  if (!decompress(buf, hdr->text_memoffset, hdr->ro_memoffset - hdr->text_memoffset, tmp, hdr->text_size)) {
150  RZ_LOG_ERROR("Failed to decompress NSO text section\n");
151  goto another_castle;
152  }
153  if (!decompress(buf, hdr->ro_memoffset, hdr->data_memoffset - hdr->ro_memoffset, tmp + hdr->text_size, hdr->ro_size)) {
154  RZ_LOG_ERROR("Failed to decompress NSO ro section\n");
155  goto another_castle;
156  }
157  if (!decompress(buf, hdr->data_memoffset, rz_buf_size(buf) - hdr->data_memoffset, tmp + hdr->text_size + hdr->ro_size, hdr->data_size)) {
158  RZ_LOG_ERROR("Failed to decompress NSO data section\n");
159  goto another_castle;
160  }
161  bin->decompressed = rz_buf_new_with_pointers(tmp, total_size, true);
162  if (!bin->decompressed) {
163  goto another_castle;
164  }
165 
166  /* Load unpacked binary */
167  ut32 modoff;
168  if (!rz_buf_read_le32_at(bin->decompressed, NSO_OFFSET_MODMEMOFF, &modoff)) {
169  goto another_castle;
170  }
171 
172  RZ_LOG_INFO("MOD Offset = 0x%" PFMT64x "\n", (ut64)modoff);
173  parseMod(bin->decompressed, bin, modoff, ba);
174  obj->bin_obj = bin;
175  return true;
176 another_castle:
177  nso_free(bin);
178  free(tmp);
179  obj->bin_obj = NULL;
180  return false;
181 }
182 
183 static void destroy(RzBinFile *bf) {
184  if (!bf->o) {
185  return;
186  }
187  nso_free(bf->o->bin_obj);
188 }
189 
191  return NULL; // TODO
192 }
193 
194 static RzList *entries(RzBinFile *bf) {
195  RzList *ret;
196  RzBuffer *b = bf->buf;
197 
198  if (!(ret = rz_list_new())) {
199  return NULL;
200  }
201 
202  ret->free = free;
203 
204  RzBinAddr *ptr = RZ_NEW0(RzBinAddr);
205  if (!ptr) {
206  rz_list_free(ret);
207  return NULL;
208  }
209 
210  ut32 tmp;
211  if (!rz_buf_read_le32_at(b, NSO_OFF(text_memoffset), &tmp)) {
212  rz_list_free(ret);
213  free(ptr);
214  return NULL;
215  }
216  ptr->paddr = tmp;
217 
218  if (!rz_buf_read_le32_at(b, NSO_OFF(text_loc), &tmp)) {
219  rz_list_free(ret);
220  free(ptr);
221  return NULL;
222  }
223  ptr->vaddr = tmp;
224 
225  ptr->vaddr += baddr(bf);
226 
227  rz_list_append(ret, ptr);
228 
229  return ret;
230 }
231 
232 static Sdb *get_sdb(RzBinFile *bf) {
233  Sdb *kv = sdb_new0();
234  sdb_num_set(kv, "nso_start.offset", 0, 0);
235  sdb_num_set(kv, "nso_start.size", 16, 0);
236  sdb_set(kv, "nso_start.format", "xxq unused mod_memoffset padding", 0);
237  sdb_num_set(kv, "nso_header.offset", 0, 0);
238  sdb_num_set(kv, "nso_header.size", 0x40, 0);
239  sdb_set(kv, "nso_header.format", "xxxxxxxxxxxx magic unk size unk2 text_offset text_size ro_offset ro_size data_offset data_size bss_size unk3", 0);
240  sdb_ns_set(bf->sdb, "info", kv);
241  return kv;
242 }
243 
246  if (!ret) {
247  return NULL;
248  }
249  RzBinNXOObj *bin = bf->o->bin_obj;
250  if (bin->decompressed) {
252  if (!vf) {
253  return ret;
254  }
255  vf->buf = bin->decompressed;
256  vf->buf_owned = false;
258  rz_list_push(ret, vf);
259  }
260  return ret;
261 }
262 
263 static RzList *maps(RzBinFile *bf) {
265  if (!ret) {
266  return NULL;
267  }
268 
269  RzBinNXOObj *bin = bf->o->bin_obj;
270  NSOHeader *hdr = bin->header;
271  ut64 ba = baddr(bf);
272 
274  if (!map) {
275  return ret;
276  }
277  map->name = strdup("text");
278  map->paddr = bin->decompressed ? 0 : hdr->text_memoffset;
279  map->vsize = map->psize = hdr->text_size;
280  map->vaddr = hdr->text_loc + ba;
281  map->perm = RZ_PERM_RX;
282  map->vfile_name = bin->decompressed ? strdup(VFILE_NAME_DECOMPRESSED) : NULL;
283  rz_list_append(ret, map);
284 
285  // add ro segment
286  map = RZ_NEW0(RzBinMap);
287  if (!map) {
288  return ret;
289  }
290  map->name = strdup("ro");
291  map->paddr = bin->decompressed ? hdr->text_size : hdr->ro_memoffset;
292  map->vsize = map->psize = hdr->ro_size;
293  map->vaddr = hdr->ro_loc + ba;
294  map->perm = RZ_PERM_R;
295  map->vfile_name = bin->decompressed ? strdup(VFILE_NAME_DECOMPRESSED) : NULL;
296  rz_list_append(ret, map);
297 
298  // add data segment
299  map = RZ_NEW0(RzBinMap);
300  if (!map) {
301  return ret;
302  }
303  map->name = strdup("data");
304  map->paddr = bin->decompressed ? hdr->text_size + hdr->ro_size : hdr->data_memoffset;
305  map->vsize = map->psize = hdr->data_size;
306  map->vaddr = hdr->data_loc + ba;
307  map->perm = RZ_PERM_RW;
308  map->vfile_name = bin->decompressed ? strdup(VFILE_NAME_DECOMPRESSED) : NULL;
309  rz_list_append(ret, map);
310  return ret;
311 }
312 
313 static RzList *sections(RzBinFile *bf) {
314  RzList *ret = NULL;
315  RzBinSection *ptr = NULL;
316  RzBuffer *b = bf->buf;
318  return NULL;
319  }
320 
321  if (!(ptr = RZ_NEW0(RzBinSection))) {
322  return ret;
323  }
324  ptr->name = strdup("header");
325  ut32 tmp;
326  if (!rz_buf_read_le32_at(b, NSO_OFF(text_memoffset), &tmp)) {
327  rz_list_free(ret);
328  return NULL;
329  }
330  ptr->size = tmp;
331 
332  if (!rz_buf_read_le32_at(b, NSO_OFF(text_memoffset), &tmp)) {
333  rz_list_free(ret);
334  return NULL;
335  }
336  ptr->vsize = tmp;
337 
338  ptr->paddr = 0;
339  ptr->vaddr = 0;
340  ptr->perm = RZ_PERM_R;
341  rz_list_append(ret, ptr);
342 
343  RzList *mappies = maps(bf);
344  if (mappies) {
345  RzList *msecs = rz_bin_sections_of_maps(mappies);
346  if (msecs) {
347  rz_list_join(ret, msecs);
348  rz_list_free(msecs);
349  }
350  rz_list_free(mappies);
351  }
352  return ret;
353 }
354 
355 static RzBinInfo *info(RzBinFile *bf) {
356  RzBinInfo *ret = RZ_NEW0(RzBinInfo);
357  if (!ret) {
358  return NULL;
359  }
360  ut8 magic[4];
361  if (rz_buf_read_at(bf->buf, NSO_OFF(magic), magic, sizeof(magic)) != sizeof(magic)) {
362  free(ret);
363  return NULL;
364  }
365 
366  const char *ft = fileType(magic);
367  if (!ft) {
368  ft = "nso";
369  }
370  ret->file = strdup(bf->file);
371  ret->rclass = strdup(ft);
372  ret->os = strdup("switch");
373  ret->arch = strdup("arm");
374  ret->machine = strdup("Nintendo Switch");
375  ret->subsystem = strdup(ft);
376  ret->bclass = strdup("program");
377  ret->type = strdup("EXEC (executable file)");
378  ret->bits = 64;
379  ret->has_va = true;
380  ret->big_endian = false;
381  ret->dbg_info = 0;
382  return ret;
383 }
384 
385 #if !RZ_BIN_NSO
386 
388  .name = "nso",
389  .desc = "Nintendo Switch NSO0 binaries",
390  .license = "MIT",
391  .load_buffer = &load_buffer,
392  .destroy = &destroy,
393  .check_buffer = &check_buffer,
394  .baddr = &baddr,
395  .binsym = &binsym,
396  .entries = &entries,
397  .virtual_files = &virtual_files,
398  .maps = &maps,
399  .sections = &sections,
400  .get_sdb = &get_sdb,
401  .info = &info,
402 };
403 
404 #ifndef RZ_PLUGIN_INCORE
407  .data = &rz_bin_plugin_nso,
409 };
410 #endif
411 #endif
RZ_API void rz_bin_map_free(RzBinMap *map)
Definition: bin.c:1023
RZ_API RzList * rz_bin_sections_of_maps(RzList *maps)
Create a list of RzBinSection from RzBinMaps.
Definition: bin.c:1084
RZ_API void rz_bin_section_free(RzBinSection *bs)
Definition: bin.c:1116
RZ_API void rz_bin_virtual_file_free(RzBinVirtualFile *vfile)
Definition: bin.c:1012
static NSOHeader * parse_header(RzBuffer *buf)
Definition: bin_nso.c:68
RzBinPlugin rz_bin_plugin_nso
Definition: bin_nso.c:387
#define VFILE_NAME_DECOMPRESSED
Definition: bin_nso.c:12
static Sdb * get_sdb(RzBinFile *bf)
Definition: bin_nso.c:232
static bool load_buffer(RzBinFile *bf, RzBinObject *obj, RzBuffer *buf, Sdb *sdb)
Definition: bin_nso.c:125
static RzBinNXOObj * nso_new(RzBuffer *buf)
Definition: bin_nso.c:86
static RzBinAddr * binsym(RzBinFile *bf, RzBinSpecialSymbol type)
Definition: bin_nso.c:190
static void nso_free(RzBinNXOObj *bin)
Definition: bin_nso.c:99
static void destroy(RzBinFile *bf)
Definition: bin_nso.c:183
RZ_API RzLibStruct rizin_plugin
Definition: bin_nso.c:405
static bool check_buffer(RzBuffer *b)
Definition: bin_nso.c:38
static RzList * virtual_files(RzBinFile *bf)
Definition: bin_nso.c:244
static RzBinInfo * info(RzBinFile *bf)
Definition: bin_nso.c:355
#define NSO_OFF(x)
Definition: bin_nso.c:9
static ut64 baddr(RzBinFile *bf)
Definition: bin_nso.c:34
static RzList * entries(RzBinFile *bf)
Definition: bin_nso.c:194
#define NSO_OFFSET_MODMEMOFF
Definition: bin_nso.c:10
static RzList * maps(RzBinFile *bf)
Definition: bin_nso.c:263
static RzList * sections(RzBinFile *bf)
Definition: bin_nso.c:313
static bool decompress(RzBuffer *source_buf, ut64 source_offset, ut64 source_size, ut8 *dst_buf, ut64 decompressed_size)
Definition: bin_nso.c:108
static bool parse_header_aux(RzBuffer *buf, NSOHeader *r)
Definition: bin_nso.c:49
#define RZ_API
#define INT_MAX
Definition: cp-demangle.c:131
#define NULL
Definition: cris-opc.c:27
#define r
Definition: crypto_rc6.c:12
uint32_t ut32
size_t map(int syms, int left, int len)
Definition: enough.c:237
RZ_API void Ht_() free(HtName_(Ht) *ht)
Definition: ht_inc.c:130
voidpf void * buf
Definition: ioapi.h:138
uint8_t ut8
Definition: lh5801.h:11
RZ_API RZ_OWN RzList * rz_list_newf(RzListFree f)
Returns a new initialized RzList pointer and sets the free method.
Definition: list.c:248
RZ_API RZ_OWN RzList * rz_list_new(void)
Returns a new initialized RzList pointer (free method is not initialized)
Definition: list.c:235
RZ_API bool rz_list_join(RZ_NONNULL RzList *list1, RZ_NONNULL RzList *list2)
Joins 2 list into one (list2 pointer needs to be freed by the user)
Definition: list.c:209
RZ_API RZ_BORROW RzListIter * rz_list_push(RZ_NONNULL RzList *list, void *item)
Alias for rz_list_append.
Definition: list.c:60
RZ_API RZ_BORROW RzListIter * rz_list_append(RZ_NONNULL RzList *list, void *data)
Appends at the end of the list a new element.
Definition: list.c:288
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
Definition: list.c:137
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
LZ4_FORCE_O2 int LZ4_decompress_safe(const char *source, char *dest, int compressedSize, int maxDecompressedSize)
Definition: lz4.c:2171
int type
Definition: mipsasm.c:17
RZ_API int sdb_ns_set(Sdb *s, const char *name, Sdb *r)
Definition: ns.c:156
RZ_API int sdb_num_set(Sdb *s, const char *key, ut64 v, ut32 cas)
Definition: num.c:25
void parseMod(RzBuffer *buf, RzBinNXOObj *bin, ut32 mod0, ut64 baddr)
Definition: nxo.c:130
const char * fileType(const ut8 *buf)
Definition: nxo.c:24
#define rz_return_val_if_fail(expr, val)
Definition: rz_assert.h:108
#define RZ_STATIC_ASSERT(x)
Definition: rz_assert.h:10
RzBinSpecialSymbol
Definition: rz_bin.h:136
RZ_API st64 rz_buf_read_at(RZ_NONNULL RzBuffer *b, ut64 addr, RZ_NONNULL RZ_OUT ut8 *buf, ut64 len)
Read len bytes of the buffer at the specified address.
Definition: buf.c:1136
RZ_API RZ_OWN RzBuffer * rz_buf_new_with_pointers(const ut8 *bytes, ut64 len, bool steal)
Creates a new buffer with a bytes array.
Definition: buf.c:552
#define rz_buf_read_le32_at(b, addr, result)
Definition: rz_buf.h:271
RZ_API void rz_buf_free(RzBuffer *b)
Free all internal data hold by the buffer and the buffer.
Definition: buf.c:1253
RZ_API ut64 rz_buf_size(RZ_NONNULL RzBuffer *b)
Return the size of the buffer.
Definition: buf.c:1225
@ RZ_LIB_TYPE_BIN
Definition: rz_lib.h:75
void(* RzListFree)(void *ptr)
Definition: rz_list.h:11
#define RZ_LOG_INFO(fmtstr,...)
Definition: rz_log.h:54
#define RZ_LOG_ERROR(fmtstr,...)
Definition: rz_log.h:58
#define RZ_PERM_R
Definition: rz_types.h:93
#define RZ_NEW0(x)
Definition: rz_types.h:284
#define RZ_PERM_RW
Definition: rz_types.h:96
#define RZ_PERM_RX
Definition: rz_types.h:97
#define RZ_NEWS0(x, y)
Definition: rz_types.h:282
#define PFMT64x
Definition: rz_types.h:393
#define RZ_VERSION
Definition: rz_version.h:8
RZ_API int sdb_set(Sdb *s, const char *key, const char *val, ut32 cas)
Definition: sdb.c:611
RZ_API Sdb * sdb_new0(void)
Definition: sdb.c:43
#define b(i)
Definition: sha256.c:42
#define SIZE_MAX
ut32 text_memoffset
Definition: bin_nso.c:20
ut32 ro_memoffset
Definition: bin_nso.c:24
ut32 pad2
Definition: bin_nso.c:19
ut32 magic
Definition: bin_nso.c:16
ut32 pad4
Definition: bin_nso.c:27
ut32 pad0
Definition: bin_nso.c:17
ut32 data_memoffset
Definition: bin_nso.c:28
ut32 text_loc
Definition: bin_nso.c:21
ut32 pad3
Definition: bin_nso.c:23
ut32 bss_size
Definition: bin_nso.c:31
ut32 data_size
Definition: bin_nso.c:30
ut32 data_loc
Definition: bin_nso.c:29
ut32 pad1
Definition: bin_nso.c:18
ut32 ro_size
Definition: bin_nso.c:26
ut32 ro_loc
Definition: bin_nso.c:25
ut32 text_size
Definition: bin_nso.c:22
Definition: malloc.c:26
ut64 vaddr
Definition: rz_bin.h:186
ut64 paddr
Definition: rz_bin.h:187
XX curplugin == o->plugin.
Definition: rz_bin.h:298
RzBinObject * o
Definition: rz_bin.h:305
RZ_DEPRECATE Sdb * sdb
deprecated, put info in C structures instead of this
Definition: rz_bin.h:315
char * file
Definition: rz_bin.h:299
RzBuffer * buf
Definition: rz_bin.h:303
int has_va
Definition: rz_bin.h:228
char * type
Definition: rz_bin.h:211
char * os
Definition: rz_bin.h:219
char * subsystem
Definition: rz_bin.h:220
char * machine
Definition: rz_bin.h:216
char * bclass
Definition: rz_bin.h:212
char * file
Definition: rz_bin.h:210
ut64 dbg_info
Definition: rz_bin.h:240
char * rclass
Definition: rz_bin.h:213
char * arch
Definition: rz_bin.h:214
int big_endian
Definition: rz_bin.h:235
Description of a single memory mapping into virtual memory from a binary.
Definition: rz_bin.h:602
void * bin_obj
Definition: rz_bin.h:293
char * name
Definition: rz_bin.h:509
char * version
Definition: rz_bin.h:512
char * name
Definition: rz_bin.h:619
RZ_NONNULL RzBuffer * buf
Definition: rz_bin.h:597
bool buf_owned
whether buf is owned and freed by this RzBinVirtualFile
Definition: rz_bin.h:598
RZ_OWN RZ_NONNULL char * name
Definition: rz_bin.h:596
RzListFree free
Definition: rz_list.h:21
Definition: sdb.h:63
ut64(WINAPI *w32_GetEnabledXStateFeatures)()