This repository has been archived by the owner on Jun 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnopsled.s
110 lines (100 loc) · 4.11 KB
/
nopsled.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/*
Copyright 2016 Seth VanHeulen
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "constants.h"
.org 0x80, 0
.ascii "CRO0" // magic
.word _cro_module_name // module name offset
.word 0 // next cro pointer
.word 0 // previous cro pointer
.word _cro_file_end // file size
.word 0 // .bss size
.word 0 // unknown
.word 0 // unknown
.word 0 // nnroControlObject_ segment offset
.word 0xffffffff // OnLoad segment offset
.word 0xffffffff // OnExit segment offset
.word 0xffffffff // OnUnresolved segment offset
.word _cro_text_start // .text offset
.word _cro_module_name-_cro_text_start // .text size
.word _cro_data_start // .data offset
.word _cro_data_end-_cro_data_start // .data size
.word _cro_module_name // module name offset
.word _cro_segment_table-_cro_module_name // module name size
.word _cro_segment_table // segment table offset
.word (_cro_named_export_table-_cro_segment_table)/0xc // segment table count
.word _cro_named_export_table // named export table offset
.word (_cro_export_tree-_cro_named_export_table)/8 // named export table count
.word _cro_indexed_export_table // indexed export table offset
.word (_cro_export_strings-_cro_indexed_export_table)/4 // indexed export table count
.word _cro_export_strings // export strings offset
.word _cro_import_module_table-_cro_export_strings // export strings size
.word _cro_export_tree // export tree offset
.word (_cro_indexed_export_table-_cro_export_tree)/8 // export tree count
.word _cro_import_module_table // import module table offset
.word (_cro_import_patches-_cro_import_module_table)/0x14 // import module table count
.word _cro_import_patches // import patches offset
.word (_cro_named_import_table-_cro_import_patches)/0xc // import patches count
.word _cro_named_import_table // named import table offset
.word (_cro_indexed_import_table-_cro_named_import_table)/8 // named import table count
.word _cro_indexed_import_table // indexed import table offset
.word (_cro_anon_import_table-_cro_indexed_import_table)/8 // indexed import table count
.word _cro_anon_import_table // anonymous import table offset
.word (_cro_import_strings-_cro_anon_import_table)/8 // anonymous import table count
.word _cro_import_strings // import strings offset
.word _cro_unknown1-_cro_import_strings // import strings size
.word _cro_unknown1 // unknown offset
.word 0 // unknown count
.word _cro_relocation_patches // relocation patches offset
.word (_cro_unknown2-_cro_relocation_patches)/0xc // relocation patches count
.word _cro_unknown2 // unknown offset
.word 0 // unknown count
.org 0x180, 0
.arm
_cro_text_start:
.fill ICACHE_SIZE
bx lr
_cro_text_end:
.align 12, 0
_cro_rodata_start:
_cro_rodata_end:
.align 12, 0
_cro_module_name:
.asciz "nopsled"
_cro_segment_table:
.word _cro_text_start, _cro_text_end-_cro_text_start, 0
.word _cro_rodata_start, _cro_rodata_end-_cro_rodata_start, 1
.word _cro_data_start, _cro_data_end-_cro_data_start, 2
.word 0, 0, 0
.word 0, 0, 0
_cro_named_export_table:
.word _cro_export_strings, 0
_cro_export_tree:
.word 0x1ffff, 0
.word 0x80000000, 0x8001
_cro_indexed_export_table:
_cro_export_strings:
.asciz "nnroControlObject_"
_cro_import_module_table:
_cro_import_patches:
_cro_named_import_table:
_cro_indexed_import_table:
_cro_anon_import_table:
_cro_import_strings:
_cro_unknown1:
_cro_relocation_patches:
_cro_unknown2:
_cro_data_start:
_cro_data_end:
.align 12, 0xcc
_cro_file_end: