Rizin
unix-like reverse engineering framework and cli tools
nxo.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2018 rkx1209 <rkx1209dev@gmail.com>
2
// SPDX-License-Identifier: LGPL-3.0-only
3
4
#ifndef _NXO_H
5
#define _NXO_H
6
7
typedef
struct
{
8
ut32
unused
;
9
ut32
mod_memoffset
;
10
ut64
padding
;
11
}
NXOStart
;
12
13
typedef
struct
{
14
ut32
magic
;
15
ut32
dynamic
;
16
ut32
bss_start
;
17
ut32
bss_end
;
18
ut32
unwind_start
;
19
ut32
unwind_end
;
20
ut32
mod_object
;
21
}
MODHeader
;
22
23
typedef
struct
{
24
ut64
next
;
25
ut64
prev
;
26
ut64
relplt
;
27
ut64
reldyn
;
28
ut64
base
;
29
ut64
dynamic
;
30
ut64
is_rela
;
31
ut64
relplt_size
;
32
ut64
init
;
33
ut64
fini
;
34
ut64
bucket
;
35
ut64
chain
;
36
ut64
strtab
;
37
ut64
symtab
;
38
ut64
strtab_size
;
39
ut64
got
;
40
ut64
reladyn_size
;
41
ut64
reldyn_size
;
42
ut64
relcount
;
43
ut64
relacount
;
44
ut64
nchain
;
45
ut64
nbucket
;
46
ut64
got_value
;
47
}
MODObject
;
48
49
typedef
struct
{
50
ut32
mod_offset
;
51
ut32
text_offset
;
52
ut32
text_size
;
53
ut32
ro_offset
;
54
ut32
ro_size
;
55
ut32
data_offset
;
56
ut32
data_size
;
57
ut32
bss_size
;
58
}
MODMeta
;
59
60
typedef
struct
{
61
ut32
*
strings
;
62
RzList
*
methods_list
;
63
RzList
*
imports_list
;
64
RzList
*
classes_list
;
65
RZ_NULLABLE
RzBuffer
*
decompressed
;
66
void
*
header
;
67
}
RzBinNXOObj
;
68
69
void
parseMod
(
RzBuffer
*
buf
,
RzBinNXOObj
*
bin
,
ut32
mod0,
ut64
baddr
);
70
const
char
*
fileType
(
const
ut8
*
buf
);
71
72
#endif
baddr
static ut64 baddr(RzBinFile *bf)
Definition:
bin_any.c:58
ut32
uint32_t ut32
Definition:
demangler_util.h:31
buf
voidpf void * buf
Definition:
ioapi.h:138
ut8
uint8_t ut8
Definition:
lh5801.h:11
parseMod
void parseMod(RzBuffer *buf, RzBinNXOObj *bin, ut32 mod0, ut64 baddr)
Definition:
nxo.c:130
fileType
const char * fileType(const ut8 *buf)
Definition:
nxo.c:24
RZ_NULLABLE
#define RZ_NULLABLE
Definition:
rz_types.h:65
MODHeader
Definition:
nxo.h:13
MODHeader::magic
ut32 magic
Definition:
nxo.h:14
MODHeader::bss_end
ut32 bss_end
Definition:
nxo.h:17
MODHeader::bss_start
ut32 bss_start
Definition:
nxo.h:16
MODHeader::dynamic
ut32 dynamic
Definition:
nxo.h:15
MODHeader::unwind_start
ut32 unwind_start
Definition:
nxo.h:18
MODHeader::mod_object
ut32 mod_object
Definition:
nxo.h:20
MODHeader::unwind_end
ut32 unwind_end
Definition:
nxo.h:19
MODMeta
Definition:
nxo.h:49
MODMeta::text_size
ut32 text_size
Definition:
nxo.h:52
MODMeta::ro_size
ut32 ro_size
Definition:
nxo.h:54
MODMeta::bss_size
ut32 bss_size
Definition:
nxo.h:57
MODMeta::text_offset
ut32 text_offset
Definition:
nxo.h:51
MODMeta::data_offset
ut32 data_offset
Definition:
nxo.h:55
MODMeta::mod_offset
ut32 mod_offset
Definition:
nxo.h:50
MODMeta::ro_offset
ut32 ro_offset
Definition:
nxo.h:53
MODMeta::data_size
ut32 data_size
Definition:
nxo.h:56
MODObject
Definition:
nxo.h:23
MODObject::dynamic
ut64 dynamic
Definition:
nxo.h:29
MODObject::prev
ut64 prev
Definition:
nxo.h:25
MODObject::reldyn_size
ut64 reldyn_size
Definition:
nxo.h:41
MODObject::relacount
ut64 relacount
Definition:
nxo.h:43
MODObject::fini
ut64 fini
Definition:
nxo.h:33
MODObject::symtab
ut64 symtab
Definition:
nxo.h:37
MODObject::init
ut64 init
Definition:
nxo.h:32
MODObject::nbucket
ut64 nbucket
Definition:
nxo.h:45
MODObject::got
ut64 got
Definition:
nxo.h:39
MODObject::next
ut64 next
Definition:
nxo.h:24
MODObject::relplt_size
ut64 relplt_size
Definition:
nxo.h:31
MODObject::reldyn
ut64 reldyn
Definition:
nxo.h:27
MODObject::strtab_size
ut64 strtab_size
Definition:
nxo.h:38
MODObject::bucket
ut64 bucket
Definition:
nxo.h:34
MODObject::is_rela
ut64 is_rela
Definition:
nxo.h:30
MODObject::base
ut64 base
Definition:
nxo.h:28
MODObject::relplt
ut64 relplt
Definition:
nxo.h:26
MODObject::got_value
ut64 got_value
Definition:
nxo.h:46
MODObject::chain
ut64 chain
Definition:
nxo.h:35
MODObject::nchain
ut64 nchain
Definition:
nxo.h:44
MODObject::reladyn_size
ut64 reladyn_size
Definition:
nxo.h:40
MODObject::strtab
ut64 strtab
Definition:
nxo.h:36
MODObject::relcount
ut64 relcount
Definition:
nxo.h:42
NXOStart
Definition:
nxo.h:7
NXOStart::mod_memoffset
ut32 mod_memoffset
Definition:
nxo.h:9
NXOStart::padding
ut64 padding
Definition:
nxo.h:10
NXOStart::unused
ut32 unused
Definition:
nxo.h:8
RzBinNXOObj
Definition:
nxo.h:60
RzBinNXOObj::decompressed
RZ_NULLABLE RzBuffer * decompressed
Definition:
nxo.h:65
RzBinNXOObj::imports_list
RzList * imports_list
Definition:
nxo.h:63
RzBinNXOObj::methods_list
RzList * methods_list
Definition:
nxo.h:62
RzBinNXOObj::header
void * header
nso-only
Definition:
nxo.h:66
RzBinNXOObj::strings
ut32 * strings
Definition:
nxo.h:61
RzBinNXOObj::classes_list
RzList * classes_list
Definition:
nxo.h:64
bin
Definition:
malloc.c:26
rz_buf_t
Definition:
rz_buf.h:43
rz_list_t
Definition:
rz_list.h:18
ut64
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
librz
bin
format
nxo
nxo.h
Generated by
1.9.1