Rizin
unix-like reverse engineering framework and cli tools
bin_qnx.c File Reference
#include "qnx/qnx.h"
#include "../i/private.h"

Go to the source code of this file.

Functions

static int lmf_header_load (lmf_header *lmfh, RzBuffer *buf, Sdb *db)
 
static bool check_buffer (RzBuffer *buf)
 
static void destroy (RzBinFile *bf)
 
static bool load_buffer (RzBinFile *bf, RzBinObject *obj, RzBuffer *buf, Sdb *sdb)
 
static RzBinInfoinfo (RzBinFile *bf)
 
static RzListrelocs (RzBinFile *bf)
 
static void header (RzBinFile *bf)
 
static RzListsymbols (RzBinFile *bf)
 
static RzListmaps (RzBinFile *bf)
 
static RzListsections (RzBinFile *bf)
 
static Sdbget_sdb (RzBinFile *bf)
 
static ut64 baddr (RzBinFile *bf)
 
static RzListentries (RzBinFile *bf)
 
static char * signature (RzBinFile *bf, bool json)
 
static ut64 get_vaddr (RzBinFile *bf, ut64 baddr, ut64 paddr, ut64 vaddr)
 

Variables

RzBinPlugin rz_bin_plugin_qnx
 
RZ_API RzLibStruct rizin_plugin
 

Function Documentation

◆ baddr()

static ut64 baddr ( RzBinFile bf)
static

Definition at line 257 of file bin_qnx.c.

257  {
258  QnxObj *qo = bf->o->bin_obj;
259  return qo ? qo->lmfh.image_base : 0;
260 }
RzBinObject * o
Definition: rz_bin.h:305
void * bin_obj
Definition: rz_bin.h:293

References rz_bin_object_t::bin_obj, and rz_bin_file_t::o.

Referenced by entries().

◆ check_buffer()

static bool check_buffer ( RzBuffer buf)
static

Definition at line 29 of file bin_qnx.c.

29  {
30  ut8 tmp[6];
31  int r = rz_buf_read_at(buf, 0, tmp, sizeof(tmp));
32  return r == sizeof(tmp) && !memcmp(tmp, QNX_MAGIC, sizeof(tmp));
33 }
#define r
Definition: crypto_rc6.c:12
voidpf void * buf
Definition: ioapi.h:138
uint8_t ut8
Definition: lh5801.h:11
#define QNX_MAGIC
Definition: qnx_specs.h:15
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

References QNX_MAGIC, r, rz_buf_read_at(), and autogen_x86imm::tmp.

◆ destroy()

static void destroy ( RzBinFile bf)
static

Definition at line 36 of file bin_qnx.c.

36  {
37  QnxObj *qo = bf->o->bin_obj;
38  rz_list_free(qo->sections);
39  rz_list_free(qo->maps);
40  rz_list_free(qo->fixups);
41  bf->o->bin_obj = NULL;
42  free(qo);
43 }
#define NULL
Definition: cris-opc.c:27
RZ_API void Ht_() free(HtName_(Ht) *ht)
Definition: ht_inc.c:130
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
Definition: list.c:137

References rz_bin_object_t::bin_obj, free(), NULL, rz_bin_file_t::o, and rz_list_free().

◆ entries()

static RzList* entries ( RzBinFile bf)
static

Definition at line 266 of file bin_qnx.c.

266  {
267  RzList *ret;
268  RzBinAddr *ptr = NULL;
269  QnxObj *qo = bf->o->bin_obj;
270  if (!(ret = rz_list_new())) {
271  return NULL;
272  }
273  ret->free = free;
274  if (!(ptr = RZ_NEW0(RzBinAddr))) {
275  return ret;
276  }
277  ptr->paddr = qo->lmfh.code_offset;
278  ptr->vaddr = qo->lmfh.code_offset + baddr(bf);
279  rz_list_append(ret, ptr);
280  return ret;
281 }
static ut64 baddr(RzBinFile *bf)
Definition: bin_qnx.c:257
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 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
#define RZ_NEW0(x)
Definition: rz_types.h:284
ut64 vaddr
Definition: rz_bin.h:186
ut64 paddr
Definition: rz_bin.h:187
RzListFree free
Definition: rz_list.h:21

References baddr(), rz_bin_object_t::bin_obj, rz_list_t::free, free(), NULL, rz_bin_file_t::o, rz_bin_addr_t::paddr, rz_list_append(), rz_list_new(), RZ_NEW0, and rz_bin_addr_t::vaddr.

◆ get_sdb()

static Sdb* get_sdb ( RzBinFile bf)
static

Definition at line 243 of file bin_qnx.c.

243  {
244  RzBinObject *o = bf->o;
245  if (!o) {
246  return NULL;
247  }
248  QnxObj *qo = o->bin_obj;
249  return qo ? qo->kv : NULL;
250 }

References rz_bin_object_t::bin_obj, NULL, and rz_bin_file_t::o.

◆ get_vaddr()

static ut64 get_vaddr ( RzBinFile bf,
ut64  baddr,
ut64  paddr,
ut64  vaddr 
)
static

Definition at line 305 of file bin_qnx.c.

305  {
306  return vaddr;
307 }

◆ header()

static void header ( RzBinFile bf)
static

Definition at line 197 of file bin_qnx.c.

197  {
198  rz_return_if_fail(bf && bf->o && bf->rbin);
199  QnxObj *bin = bf->o->bin_obj;
200  RzBin *rbin = bf->rbin;
201  rbin->cb_printf("QNX file header:\n");
202  rbin->cb_printf("version : 0x%xH\n", bin->lmfh.version);
203  rbin->cb_printf("cflags : 0x%xH\n", bin->lmfh.cflags);
204  rbin->cb_printf("cpu : 0x%xH\n", bin->lmfh.cpu);
205  rbin->cb_printf("fpu : 0x%xH\n", bin->lmfh.fpu);
206  rbin->cb_printf("code_index : 0x%xH\n", bin->lmfh.code_index);
207  rbin->cb_printf("stack_index : 0x%xH\n", bin->lmfh.stack_index);
208  rbin->cb_printf("heap_index : 0x%xH\n", bin->lmfh.heap_index);
209  rbin->cb_printf("argv_index : 0x%xH\n", bin->lmfh.argv_index);
210  rbin->cb_printf("spare2[4] : 0x0H\n");
211  rbin->cb_printf("code_offset : 0x%xH\n", bin->lmfh.code_offset);
212  rbin->cb_printf("stack_nbytes : 0x%xH\n", bin->lmfh.stack_nbytes);
213  rbin->cb_printf("heap_nbytes : 0x%xH\n", bin->lmfh.heap_nbytes);
214  rbin->cb_printf("image_base : 0x%xH\n", bin->lmfh.image_base);
215  rbin->cb_printf("spare3[2] : 0x0H\n");
216 }
#define rz_return_if_fail(expr)
Definition: rz_assert.h:100
Definition: malloc.c:26
struct rz_bin_t * rbin
Definition: rz_bin.h:316
PrintfCallback cb_printf
Definition: rz_bin.h:345

References rz_bin_object_t::bin_obj, rz_bin_t::cb_printf, rz_bin_file_t::o, rz_bin_file_t::rbin, and rz_return_if_fail.

◆ info()

static RzBinInfo* info ( RzBinFile bf)
static

Definition at line 172 of file bin_qnx.c.

172  {
173  rz_return_val_if_fail(bf && bf->o && bf->o->bin_obj, NULL);
174  RzBinInfo *ret = RZ_NEW0(RzBinInfo);
175  if (!ret) {
176  return NULL;
177  }
178  ret->file = bf->file ? strdup(bf->file) : NULL;
179  ret->type = strdup("QNX Executable");
180  ret->bclass = strdup("qnx");
181  ret->machine = strdup("i386");
182  ret->rclass = strdup("QNX");
183  ret->arch = strdup("x86");
184  ret->os = strdup("any");
185  ret->subsystem = strdup("any");
186  ret->lang = "C/C++";
187  ret->signature = true;
188  return ret;
189 }
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")
#define rz_return_val_if_fail(expr, val)
Definition: rz_assert.h:108
char * file
Definition: rz_bin.h:299
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
const char * lang
Definition: rz_bin.h:224
char * bclass
Definition: rz_bin.h:212
char * file
Definition: rz_bin.h:210
bool signature
Definition: rz_bin.h:239
char * rclass
Definition: rz_bin.h:213
char * arch
Definition: rz_bin.h:214

References rz_bin_info_t::arch, rz_bin_info_t::bclass, rz_bin_object_t::bin_obj, rz_bin_info_t::file, rz_bin_file_t::file, rz_bin_info_t::lang, rz_bin_info_t::machine, NULL, rz_bin_file_t::o, rz_bin_info_t::os, rz_bin_info_t::rclass, RZ_NEW0, rz_return_val_if_fail, rz_bin_info_t::signature, strdup(), rz_bin_info_t::subsystem, and rz_bin_info_t::type.

◆ lmf_header_load()

static int lmf_header_load ( lmf_header *  lmfh,
RzBuffer buf,
Sdb db 
)
static

Definition at line 7 of file bin_qnx.c.

7  {
8  if (rz_buf_size(buf) < sizeof(lmf_header)) {
9  return false;
10  }
11  if (rz_buf_fread_at(buf, QNX_HEADER_ADDR, (ut8 *)lmfh, "iiiiiiiicccciiiicc", 1) < QNX_HDR_SIZE) {
12  return false;
13  }
14  sdb_set(db, "qnx.version", sdb_fmt("0x%xH", lmfh->version), 0);
15  sdb_set(db, "qnx.cflags", sdb_fmt("0x%xH", lmfh->cflags), 0);
16  sdb_set(db, "qnx.cpu", sdb_fmt("0x%xH", lmfh->cpu), 0);
17  sdb_set(db, "qnx.fpu", sdb_fmt("0x%xH", lmfh->fpu), 0);
18  sdb_set(db, "qnx.code_index", sdb_fmt("0x%x", lmfh->code_index), 0);
19  sdb_set(db, "qnx.stack_index", sdb_fmt("0x%x", lmfh->stack_index), 0);
20  sdb_set(db, "qnx.heap_index", sdb_fmt("0x%x", lmfh->heap_index), 0);
21  sdb_set(db, "qnx.argv_index", sdb_fmt("0x%x", lmfh->argv_index), 0);
22  sdb_set(db, "qnx.code_offset", sdb_fmt("0x%x", lmfh->code_offset), 0);
23  sdb_set(db, "qnx.stack_nbytes", sdb_fmt("0x%x", lmfh->stack_nbytes), 0);
24  sdb_set(db, "qnx.heap_nbytes", sdb_fmt("0x%x", lmfh->heap_nbytes), 0);
25  sdb_set(db, "qnx.image_base", sdb_fmt("0x%x", lmfh->image_base), 0);
26  return true;
27 }
RZ_API char * sdb_fmt(const char *fmt,...)
Definition: fmt.c:26
#define QNX_HEADER_ADDR
Definition: qnx_specs.h:18
#define QNX_HDR_SIZE
Definition: qnx_specs.h:16
RZ_API st64 rz_buf_fread_at(RZ_NONNULL RzBuffer *b, ut64 addr, RZ_NONNULL ut8 *buf, RZ_NONNULL const char *fmt, int n)
...
Definition: buf.c:1001
RZ_API ut64 rz_buf_size(RZ_NONNULL RzBuffer *b)
Return the size of the buffer.
Definition: buf.c:1225
RZ_API int sdb_set(Sdb *s, const char *key, const char *val, ut32 cas)
Definition: sdb.c:611

References QNX_HDR_SIZE, QNX_HEADER_ADDR, rz_buf_fread_at(), rz_buf_size(), sdb_fmt(), and sdb_set().

Referenced by load_buffer().

◆ load_buffer()

static bool load_buffer ( RzBinFile bf,
RzBinObject obj,
RzBuffer buf,
Sdb sdb 
)
static

Definition at line 45 of file bin_qnx.c.

45  {
46  lmf_record lrec;
47  lmf_resource lres;
48  lmf_data ldata;
50 
51  QnxObj *qo = RZ_NEW0(QnxObj);
52  if (!qo) {
53  return false;
54  }
55 
58  RzList *fixups = rz_list_newf(free);
59  if (!sections || !maps || !fixups) {
60  goto beach;
61  }
62  qo->kv = sdb_new0();
63  if (!qo->kv) {
64  goto beach;
65  }
66  // Read the first record
67  if (rz_buf_fread_at(bf->buf, 0, (ut8 *)&lrec, "ccss", 1) < QNX_RECORD_SIZE) {
68  goto beach;
69  }
70  // Load the header
71  lmf_header_load(&qo->lmfh, bf->buf, qo->kv);
72  offset += lrec.data_nbytes;
73 
74  for (;;) {
75  if (rz_buf_fread_at(bf->buf, offset, (ut8 *)&lrec, "ccss", 1) < QNX_RECORD_SIZE) {
76  goto beach;
77  }
78  offset += sizeof(lmf_record);
79 
80  if (lrec.rec_type == LMF_IMAGE_END_REC) {
81  break;
82  } else if (lrec.rec_type == LMF_RESOURCE_REC) {
83  if (rz_buf_fread_at(bf->buf, offset, (ut8 *)&lres, "ssss", 1) < sizeof(lmf_resource)) {
84  goto beach;
85  }
87  if (!ptr) {
88  goto beach;
89  }
90  ptr->name = strdup("LMF_RESOURCE");
91  ptr->paddr = offset;
92  ptr->vsize = lrec.data_nbytes - sizeof(lmf_resource);
93  ptr->size = ptr->vsize;
95 
97  if (!map) {
98  goto beach;
99  }
100  map->name = ptr->name ? strdup(ptr->name) : NULL;
101  map->paddr = ptr->paddr;
102  map->psize = ptr->size;
103  map->vsize = ptr->vsize;
105  } else if (lrec.rec_type == LMF_LOAD_REC) {
107  if (!ptr) {
108  goto beach;
109  }
110  if (rz_buf_fread_at(bf->buf, offset, (ut8 *)&ldata, "si", 1) < sizeof(lmf_data)) {
111  free(ptr);
112  goto beach;
113  }
114  ptr->name = strdup("LMF_LOAD");
115  ptr->paddr = offset;
116  ptr->vaddr = ldata.offset;
117  ptr->vsize = lrec.data_nbytes - sizeof(lmf_data);
118  ptr->size = ptr->vsize;
119  rz_list_append(sections, ptr);
120 
122  if (!map) {
123  goto beach;
124  }
125  map->name = ptr->name ? strdup(ptr->name) : NULL;
126  map->paddr = ptr->paddr;
127  map->psize = ptr->size;
128  map->vsize = ptr->vsize;
130  } else if (lrec.rec_type == LMF_FIXUP_REC) {
131  RzBinReloc *ptr = RZ_NEW0(RzBinReloc);
132  if (!ptr || rz_buf_fread_at(bf->buf, offset, (ut8 *)&ldata, "si", 1) < sizeof(lmf_data)) {
133  free(ptr);
134  goto beach;
135  }
136  ptr->vaddr = ptr->paddr = ldata.offset;
137  ptr->type = 'f'; // "LMF_FIXUP";
138  rz_list_append(fixups, ptr);
139  } else if (lrec.rec_type == LMF_8087_FIXUP_REC) {
140  RzBinReloc *ptr = RZ_NEW0(RzBinReloc);
141  if (!ptr || rz_buf_fread_at(bf->buf, offset, (ut8 *)&ldata, "si", 1) < sizeof(lmf_data)) {
142  free(ptr);
143  goto beach;
144  }
145  ptr->vaddr = ptr->paddr = ldata.offset;
146  ptr->type = 'F'; // "LMF_8087_FIXUP";
147  rz_list_append(fixups, ptr);
148  } else if (lrec.rec_type == LMF_RW_END_REC) {
149  rz_buf_fread_at(bf->buf, offset, (ut8 *)&qo->rwend, "si", 1);
150  }
151  offset += lrec.data_nbytes;
152  }
153  sdb_ns_set(sdb, "info", qo->kv);
154  qo->sections = sections;
155  qo->maps = maps;
156  qo->fixups = fixups;
157  obj->bin_obj = qo;
158  return true;
159 beach:
160  free(qo);
161  rz_list_free(fixups);
164  return false;
165 }
RZ_API void rz_bin_map_free(RzBinMap *map)
Definition: bin.c:1023
RZ_API void rz_bin_section_free(RzBinSection *bs)
Definition: bin.c:1116
static int lmf_header_load(lmf_header *lmfh, RzBuffer *buf, Sdb *db)
Definition: bin_qnx.c:7
static RzList * maps(RzBinFile *bf)
Definition: bin_qnx.c:225
static RzList * sections(RzBinFile *bf)
Definition: bin_qnx.c:232
size_t map(int syms, int left, int len)
Definition: enough.c:237
voidpf uLong offset
Definition: ioapi.h:144
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 int sdb_ns_set(Sdb *s, const char *name, Sdb *r)
Definition: ns.c:156
@ LMF_LOAD_REC
Definition: qnx.h:17
@ LMF_RESOURCE_REC
Definition: qnx.h:21
@ LMF_FIXUP_REC
Definition: qnx.h:18
@ LMF_RW_END_REC
Definition: qnx.h:22
@ LMF_IMAGE_END_REC
Definition: qnx.h:20
@ LMF_8087_FIXUP_REC
Definition: qnx.h:19
#define QNX_RECORD_SIZE
Definition: qnx_specs.h:17
void(* RzListFree)(void *ptr)
Definition: rz_list.h:11
RZ_API Sdb * sdb_new0(void)
Definition: sdb.c:43
RzBuffer * buf
Definition: rz_bin.h:303
Description of a single memory mapping into virtual memory from a binary.
Definition: rz_bin.h:602
ut64 paddr
the paddr where the value should be patched into
Definition: rz_bin.h:717
RzBinRelocType type
Definition: rz_bin.h:712
ut64 vaddr
the vaddr where the value should be patched into
Definition: rz_bin.h:716
char * name
Definition: rz_bin.h:619
ut64(WINAPI *w32_GetEnabledXStateFeatures)()

References rz_bin_object_t::bin_obj, rz_bin_file_t::buf, free(), LMF_8087_FIXUP_REC, LMF_FIXUP_REC, lmf_header_load(), LMF_IMAGE_END_REC, LMF_LOAD_REC, LMF_RESOURCE_REC, LMF_RW_END_REC, map(), maps(), rz_bin_section_t::name, NULL, rz_bin_section_t::paddr, rz_bin_reloc_t::paddr, QNX_RECORD_SIZE, rz_bin_map_free(), rz_bin_section_free(), rz_buf_fread_at(), rz_list_append(), rz_list_free(), rz_list_newf(), RZ_NEW0, sdb_new0(), sdb_ns_set(), sections(), rz_bin_section_t::size, strdup(), rz_bin_reloc_t::type, ut64(), rz_bin_section_t::vaddr, rz_bin_reloc_t::vaddr, and rz_bin_section_t::vsize.

◆ maps()

static RzList* maps ( RzBinFile bf)
static

Definition at line 225 of file bin_qnx.c.

225  {
226  rz_return_val_if_fail(bf && bf->o, NULL);
227  QnxObj *qo = bf->o->bin_obj;
228  return rz_list_clone(qo->maps);
229 }
RZ_API RZ_OWN RzList * rz_list_clone(RZ_NONNULL const RzList *list)
Shallow copies of the list (but doesn't free its elements)
Definition: list.c:496

References rz_bin_object_t::bin_obj, NULL, rz_bin_file_t::o, rz_list_clone(), and rz_return_val_if_fail.

Referenced by load_buffer().

◆ relocs()

static RzList* relocs ( RzBinFile bf)
static

Definition at line 191 of file bin_qnx.c.

191  {
192  rz_return_val_if_fail(bf && bf->o, NULL);
193  QnxObj *qo = bf->o->bin_obj;
194  return rz_list_clone(qo->fixups);
195 }

References rz_bin_object_t::bin_obj, NULL, rz_bin_file_t::o, rz_list_clone(), and rz_return_val_if_fail.

◆ sections()

static RzList* sections ( RzBinFile bf)
static

Definition at line 232 of file bin_qnx.c.

232  {
233  rz_return_val_if_fail(bf && bf->o, NULL);
234  QnxObj *qo = bf->o->bin_obj;
235  return rz_list_clone(qo->sections);
236 }

References rz_bin_object_t::bin_obj, NULL, rz_bin_file_t::o, rz_list_clone(), and rz_return_val_if_fail.

Referenced by load_buffer().

◆ signature()

static char* signature ( RzBinFile bf,
bool  json 
)
static

Definition at line 287 of file bin_qnx.c.

287  {
288  char buf[64];
289  QnxObj *qo = bf->o->bin_obj;
290  if (!qo) {
291  return NULL;
292  }
293  if (json) {
294  PJ *pj = pj_new();
295  pj_n(pj, qo->rwend.signature);
296  return pj_drain(pj);
297  } else {
298  return rz_str_dup(NULL, sdb_itoa(qo->rwend.signature, buf, 10));
299  }
300 }
RZ_API PJ * pj_new(void)
Definition: pj.c:25
RZ_API char * pj_drain(PJ *j)
Definition: pj.c:50
RZ_API PJ * pj_n(PJ *j, ut64 n)
Definition: pj.c:252
RZ_API char * rz_str_dup(char *ptr, const char *string)
Definition: str.c:1021
RZ_API char * sdb_itoa(ut64 n, char *s, int base)
Definition: util.c:38
Definition: rz_pj.h:12

References rz_bin_object_t::bin_obj, NULL, rz_bin_file_t::o, pj_drain(), pj_n(), pj_new(), rz_str_dup(), and sdb_itoa().

◆ symbols()

static RzList* symbols ( RzBinFile bf)
static

Definition at line 221 of file bin_qnx.c.

221  {
222  return NULL;
223 }

References NULL.

Variable Documentation

◆ rizin_plugin

RZ_API RzLibStruct rizin_plugin
Initial value:
= {
.type = RZ_LIB_TYPE_BIN,
}
RzBinPlugin rz_bin_plugin_qnx
Definition: bin_qnx.c:310
@ RZ_LIB_TYPE_BIN
Definition: rz_lib.h:75
#define RZ_VERSION
Definition: rz_version.h:8
char * version
Definition: rz_bin.h:512

Definition at line 332 of file bin_qnx.c.

◆ rz_bin_plugin_qnx

RzBinPlugin rz_bin_plugin_qnx
Initial value:
= {
.name = "qnx",
.desc = "QNX executable file support",
.license = "LGPL3",
.load_buffer = &load_buffer,
.destroy = &destroy,
.relocs = &relocs,
.baddr = &baddr,
.author = "deepakchethan",
.check_buffer = &check_buffer,
.header = &header,
.get_sdb = &get_sdb,
.entries = &entries,
.maps = &maps,
.sections = &sections,
.symbols = &symbols,
.signature = &signature,
.get_vaddr = &get_vaddr,
.info = &info
}
static Sdb * get_sdb(RzBinFile *bf)
Definition: bin_qnx.c:243
static char * signature(RzBinFile *bf, bool json)
Definition: bin_qnx.c:287
static bool check_buffer(RzBuffer *buf)
Definition: bin_qnx.c:29
static bool load_buffer(RzBinFile *bf, RzBinObject *obj, RzBuffer *buf, Sdb *sdb)
Definition: bin_qnx.c:45
static RzList * symbols(RzBinFile *bf)
Definition: bin_qnx.c:221
static void header(RzBinFile *bf)
Definition: bin_qnx.c:197
static void destroy(RzBinFile *bf)
Definition: bin_qnx.c:36
static RzBinInfo * info(RzBinFile *bf)
Definition: bin_qnx.c:172
static RzList * entries(RzBinFile *bf)
Definition: bin_qnx.c:266
static ut64 get_vaddr(RzBinFile *bf, ut64 baddr, ut64 paddr, ut64 vaddr)
Definition: bin_qnx.c:305
static RzList * relocs(RzBinFile *bf)
Definition: bin_qnx.c:191

Definition at line 310 of file bin_qnx.c.