Rizin
unix-like reverse engineering framework and cli tools
qnx.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2019 deepakchethan <deepakchethan@outlook.com>
2
// SPDX-License-Identifier: LGPL-3.0-only
3
4
#ifndef _QNX_H
5
#define _QNX_H
6
7
#include "
qnx_specs.h
"
8
9
#include <
rz_util.h
>
10
#include <
rz_lib.h
>
11
#include <
rz_types.h
>
12
#include <
rz_bin.h
>
13
14
enum
{
15
LMF_HEADER_REC
= 0,
16
LMF_COMMENT_REC
,
17
LMF_LOAD_REC
,
18
LMF_FIXUP_REC
,
19
LMF_8087_FIXUP_REC
,
20
LMF_IMAGE_END_REC
,
21
LMF_RESOURCE_REC
,
22
LMF_RW_END_REC
,
23
LMF_LINEAR_FIXUP_REC
24
};
25
26
RZ_PACKED
(
27
typedef
struct
lmf_record {
28
ut8
rec_type;
29
ut8
reserved
;
// must be 0
30
ut16
data_nbytes;
// size of the data record after this.
31
ut16
spare;
// must be 0
32
})
33
lmf_record;
34
35
RZ_PACKED
(
36
typedef
struct
lmf_data {
37
ut16
segment;
38
ut32
offset
;
39
})
40
lmf_data;
41
42
RZ_PACKED
(
43
typedef
struct
lmf_header {
44
ut16
version
;
45
ut16
cflags;
46
ut16
cpu
;
// 86,186,286,386,486
47
ut16
fpu;
// 0, 87,287,387
48
ut16
code_index;
// segment of code start;
49
ut16
stack_index;
// segment to put the stack
50
ut16
heap_index;
// segment to start DS at.
51
ut16
argv_index;
// segment to put argv & environment.
52
ut16
spare2[4];
// must be zero;
53
ut32
code_offset;
// starting offset of code.
54
ut32
stack_nbytes;
// stack size
55
ut32
heap_nbytes;
// initial size of heap (optional).
56
ut32
image_base;
// starting address of image
57
ut32
spare3[2];
58
})
59
lmf_header;
60
61
RZ_PACKED
(
62
typedef
struct
lmf_eof {
63
ut8
spare[6];
64
})
65
lmf_eof;
66
67
/* values for the res_type field in the lmf_resource structure */
68
enum
{
69
RES_USAGE
= 0
70
};
71
72
RZ_PACKED
(
73
typedef
struct
lmf_resource {
74
ut16
res_type;
75
ut16
spare[3];
76
})
77
lmf_resource;
78
79
RZ_PACKED
(
80
typedef
struct
lmf_rw_end {
81
ut16
verify;
82
ut32
signature
;
83
})
84
lmf_rw_end;
85
86
RZ_PACKED
(
87
typedef
struct
{
88
Sdb
*kv;
89
lmf_header lmfh;
90
RzList
*fixups;
91
RzList
*
sections
;
92
RzList
*
maps
;
93
lmf_rw_end rwend;
94
})
95
QnxObj;
96
97
#endif
version
static char * version
Definition:
acr.h:4
cpu
static ut32 cpu[32]
Definition:
analysis_or1k.c:21
maps
static RzList * maps(RzBinFile *bf)
Definition:
bin_bf.c:116
sections
RzList * sections(RzBinFile *bf)
Definition:
bin_ne.c:110
signature
static char * signature(RzBinFile *bf, bool json)
Definition:
bin_pe.c:117
ut16
uint16_t ut16
Definition:
demangler_util.h:30
ut32
uint32_t ut32
Definition:
demangler_util.h:31
offset
voidpf uLong offset
Definition:
ioapi.h:144
ut8
uint8_t ut8
Definition:
lh5801.h:11
reserved
@ reserved
Definition:
lm32_isa.h:94
LMF_HEADER_REC
@ LMF_HEADER_REC
Definition:
qnx.h:15
LMF_LOAD_REC
@ LMF_LOAD_REC
Definition:
qnx.h:17
LMF_RESOURCE_REC
@ LMF_RESOURCE_REC
Definition:
qnx.h:21
LMF_LINEAR_FIXUP_REC
@ LMF_LINEAR_FIXUP_REC
Definition:
qnx.h:23
LMF_FIXUP_REC
@ LMF_FIXUP_REC
Definition:
qnx.h:18
LMF_RW_END_REC
@ LMF_RW_END_REC
Definition:
qnx.h:22
LMF_IMAGE_END_REC
@ LMF_IMAGE_END_REC
Definition:
qnx.h:20
LMF_COMMENT_REC
@ LMF_COMMENT_REC
Definition:
qnx.h:16
LMF_8087_FIXUP_REC
@ LMF_8087_FIXUP_REC
Definition:
qnx.h:19
RES_USAGE
@ RES_USAGE
Definition:
qnx.h:69
RZ_PACKED
RZ_PACKED(typedef struct lmf_record { ut8 rec_type;ut8 reserved;ut16 data_nbytes;ut16 spare;}) lmf_record
qnx_specs.h
rz_bin.h
rz_lib.h
rz_types.h
rz_util.h
rz_list_t
Definition:
rz_list.h:18
sdb_t
Definition:
sdb.h:63
librz
bin
format
qnx
qnx.h
Generated by
1.9.1