@isopodlabs/binary_libs 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/arch.d.ts +11 -19
- package/dist/clr.d.ts +398 -396
- package/dist/elf.d.ts +42 -2
- package/dist/elf.js +9 -8
- package/dist/mach.d.ts +402 -288
- package/dist/mach.js +33 -19
- package/dist/pe.d.ts +88 -86
- package/dist/pe.js +4 -4
- package/package.json +3 -3
package/dist/mach.d.ts
CHANGED
|
@@ -7,6 +7,23 @@ declare class mach_stream extends binary.endianStream {
|
|
|
7
7
|
substream(offset: number, size?: number): mach_stream;
|
|
8
8
|
getmem(address: bigint, size: number): Uint8Array | Promise<Uint8Array> | undefined;
|
|
9
9
|
}
|
|
10
|
+
declare const header: {
|
|
11
|
+
magic: binary.TypeT<number>;
|
|
12
|
+
cputype: binary.TypeT<string>;
|
|
13
|
+
cpusubtype: binary.TypeT<string | number>;
|
|
14
|
+
filetype: binary.TypeT<string>;
|
|
15
|
+
ncmds: binary.TypeT<number>;
|
|
16
|
+
sizeofcmds: binary.TypeT<number>;
|
|
17
|
+
flags: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
18
|
+
};
|
|
19
|
+
declare const fat_arch: {
|
|
20
|
+
cputype: binary.TypeT<string>;
|
|
21
|
+
cpusubtype: binary.TypeT<string | number>;
|
|
22
|
+
offset: binary.TypeT<number>;
|
|
23
|
+
size: binary.TypeT<number>;
|
|
24
|
+
align: binary.TypeT<number>;
|
|
25
|
+
contents: binary.TypeT<MachFile | undefined>;
|
|
26
|
+
};
|
|
10
27
|
export declare enum CMD {
|
|
11
28
|
SEGMENT = 1,// segment of this file to be mapped
|
|
12
29
|
SYMTAB = 2,// link-edit stab symbol table info
|
|
@@ -60,302 +77,407 @@ export declare enum CMD {
|
|
|
60
77
|
DYLD_EXPORTS_TRIE = 2147483699,// used with linkedit_data_command, payload is trie
|
|
61
78
|
DYLD_CHAINED_FIXUPS = 2147483700
|
|
62
79
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
data: binary.MappedMemory | undefined;
|
|
79
|
-
segname: string;
|
|
80
|
-
vmaddr: number;
|
|
81
|
-
vmsize: number;
|
|
82
|
-
fileoff: number;
|
|
83
|
-
filesize: number;
|
|
84
|
-
maxprot: number;
|
|
85
|
-
initprot: number;
|
|
86
|
-
nsects: number;
|
|
87
|
-
flags: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
88
|
-
sections: Record<string, any> | undefined;
|
|
80
|
+
declare const cmd_table: {
|
|
81
|
+
1: {
|
|
82
|
+
get(s: mach_stream): {
|
|
83
|
+
data: binary.MappedMemory | undefined;
|
|
84
|
+
segname: string;
|
|
85
|
+
vmaddr: number;
|
|
86
|
+
vmsize: number;
|
|
87
|
+
fileoff: number;
|
|
88
|
+
filesize: number;
|
|
89
|
+
maxprot: number;
|
|
90
|
+
initprot: number;
|
|
91
|
+
nsects: number;
|
|
92
|
+
flags: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
93
|
+
sections: Record<string, any> | undefined;
|
|
94
|
+
};
|
|
89
95
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
25: {
|
|
97
|
+
get(s: mach_stream): {
|
|
98
|
+
data: binary.MappedMemory | undefined;
|
|
99
|
+
segname: string;
|
|
100
|
+
vmaddr: bigint;
|
|
101
|
+
vmsize: bigint;
|
|
102
|
+
fileoff: bigint;
|
|
103
|
+
filesize: bigint;
|
|
104
|
+
maxprot: number;
|
|
105
|
+
initprot: number;
|
|
106
|
+
nsects: number;
|
|
101
107
|
flags: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
102
|
-
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
108
|
+
sections: Record<string, any> | undefined;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
6: {
|
|
112
|
+
name: {
|
|
113
|
+
get(s: binary.stream): string;
|
|
114
|
+
};
|
|
115
|
+
minor_version: binary.TypeT<binary.hex<number | bigint>>;
|
|
116
|
+
header_addr: binary.TypeT<binary.hex<number | bigint>>;
|
|
117
|
+
};
|
|
118
|
+
7: {
|
|
119
|
+
name: {
|
|
120
|
+
get(s: binary.stream): string;
|
|
121
|
+
};
|
|
122
|
+
minor_version: binary.TypeT<binary.hex<number | bigint>>;
|
|
123
|
+
header_addr: binary.TypeT<binary.hex<number | bigint>>;
|
|
124
|
+
};
|
|
125
|
+
12: {
|
|
126
|
+
name: {
|
|
127
|
+
get(s: binary.stream): string;
|
|
128
|
+
};
|
|
129
|
+
timestamp: binary.TypeT<number>;
|
|
130
|
+
current_version: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
131
|
+
compatibility_version: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
132
|
+
};
|
|
133
|
+
13: {
|
|
134
|
+
name: {
|
|
135
|
+
get(s: binary.stream): string;
|
|
136
|
+
};
|
|
137
|
+
timestamp: binary.TypeT<number>;
|
|
138
|
+
current_version: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
139
|
+
compatibility_version: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
140
|
+
};
|
|
141
|
+
2147483672: {
|
|
142
|
+
name: {
|
|
143
|
+
get(s: binary.stream): string;
|
|
144
|
+
};
|
|
145
|
+
timestamp: binary.TypeT<number>;
|
|
146
|
+
current_version: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
147
|
+
compatibility_version: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
148
|
+
};
|
|
149
|
+
2147483679: {
|
|
150
|
+
name: {
|
|
151
|
+
get(s: binary.stream): string;
|
|
152
|
+
};
|
|
153
|
+
timestamp: binary.TypeT<number>;
|
|
154
|
+
current_version: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
155
|
+
compatibility_version: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
156
|
+
};
|
|
157
|
+
32: {
|
|
158
|
+
name: {
|
|
159
|
+
get(s: binary.stream): string;
|
|
160
|
+
};
|
|
161
|
+
timestamp: binary.TypeT<number>;
|
|
162
|
+
current_version: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
163
|
+
compatibility_version: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
164
|
+
};
|
|
165
|
+
2147483683: {
|
|
166
|
+
name: {
|
|
167
|
+
get(s: binary.stream): string;
|
|
168
|
+
};
|
|
169
|
+
timestamp: binary.TypeT<number>;
|
|
170
|
+
current_version: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
171
|
+
compatibility_version: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
172
|
+
};
|
|
173
|
+
18: {
|
|
174
|
+
get(s: binary.stream): string;
|
|
175
|
+
};
|
|
176
|
+
19: {
|
|
177
|
+
get(s: binary.stream): string;
|
|
178
|
+
};
|
|
179
|
+
20: {
|
|
180
|
+
get(s: binary.stream): string;
|
|
181
|
+
};
|
|
182
|
+
21: {
|
|
183
|
+
get(s: binary.stream): string;
|
|
184
|
+
};
|
|
185
|
+
14: {
|
|
186
|
+
get(s: binary.stream): string;
|
|
187
|
+
};
|
|
188
|
+
15: {
|
|
189
|
+
get(s: binary.stream): string;
|
|
190
|
+
};
|
|
191
|
+
39: {
|
|
192
|
+
get(s: binary.stream): string;
|
|
193
|
+
};
|
|
194
|
+
2147483676: {
|
|
195
|
+
get(s: binary.stream): string;
|
|
196
|
+
};
|
|
197
|
+
16: {
|
|
198
|
+
name: {
|
|
199
|
+
get(s: binary.stream): string;
|
|
200
|
+
};
|
|
201
|
+
nmodules: binary.TypeT<number>;
|
|
202
|
+
linked_modules: {
|
|
203
|
+
get(s: binary.stream): string;
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
4: {
|
|
207
|
+
flavor: binary.TypeT<number>;
|
|
208
|
+
count: binary.TypeT<number>;
|
|
209
|
+
};
|
|
210
|
+
5: {
|
|
211
|
+
flavor: binary.TypeT<number>;
|
|
212
|
+
count: binary.TypeT<number>;
|
|
213
|
+
};
|
|
214
|
+
17: {
|
|
215
|
+
init_address: binary.TypeT<bigint> | binary.TypeT<number>;
|
|
216
|
+
init_module: binary.TypeT<bigint> | binary.TypeT<number>;
|
|
217
|
+
reserved1: binary.TypeT<bigint> | binary.TypeT<number>;
|
|
218
|
+
reserved2: binary.TypeT<bigint> | binary.TypeT<number>;
|
|
219
|
+
reserved3: binary.TypeT<bigint> | binary.TypeT<number>;
|
|
220
|
+
reserved4: binary.TypeT<bigint> | binary.TypeT<number>;
|
|
221
|
+
reserved5: binary.TypeT<bigint> | binary.TypeT<number>;
|
|
222
|
+
reserved6: binary.TypeT<bigint> | binary.TypeT<number>;
|
|
223
|
+
};
|
|
224
|
+
26: {
|
|
225
|
+
init_address: binary.TypeT<bigint> | binary.TypeT<number>;
|
|
226
|
+
init_module: binary.TypeT<bigint> | binary.TypeT<number>;
|
|
227
|
+
reserved1: binary.TypeT<bigint> | binary.TypeT<number>;
|
|
228
|
+
reserved2: binary.TypeT<bigint> | binary.TypeT<number>;
|
|
229
|
+
reserved3: binary.TypeT<bigint> | binary.TypeT<number>;
|
|
230
|
+
reserved4: binary.TypeT<bigint> | binary.TypeT<number>;
|
|
231
|
+
reserved5: binary.TypeT<bigint> | binary.TypeT<number>;
|
|
232
|
+
reserved6: binary.TypeT<bigint> | binary.TypeT<number>;
|
|
233
|
+
};
|
|
234
|
+
2: {
|
|
235
|
+
get(s: binary._stream): (string | {
|
|
236
|
+
strx: number;
|
|
237
|
+
flags: {
|
|
238
|
+
ext: number | bigint;
|
|
239
|
+
type: string;
|
|
240
|
+
pext: number | bigint;
|
|
241
|
+
stab: string;
|
|
169
242
|
};
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
flags: number | bigint;
|
|
243
|
+
sect: number;
|
|
244
|
+
desc: {
|
|
245
|
+
ref: string;
|
|
246
|
+
flags: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
247
|
+
align: number | bigint;
|
|
176
248
|
};
|
|
249
|
+
value: number | bigint;
|
|
250
|
+
})[][] | undefined;
|
|
251
|
+
};
|
|
252
|
+
22: {
|
|
253
|
+
get(s: mach_stream): {
|
|
254
|
+
sub_image: number | bigint;
|
|
255
|
+
toc: number | bigint;
|
|
177
256
|
}[] | undefined;
|
|
178
257
|
};
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
timestamp: number;
|
|
182
|
-
current_version: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
183
|
-
compatibility_version: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
184
|
-
};
|
|
185
|
-
getCommand(cmd: CMD.ID_DYLIB): {
|
|
186
|
-
name: string;
|
|
187
|
-
timestamp: number;
|
|
188
|
-
current_version: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
189
|
-
compatibility_version: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
190
|
-
};
|
|
191
|
-
getCommand(cmd: CMD.LOAD_DYLINKER): string;
|
|
192
|
-
getCommand(cmd: CMD.ID_DYLINKER): string;
|
|
193
|
-
getCommand(cmd: CMD.PREBOUND_DYLIB): {
|
|
194
|
-
name: string;
|
|
195
|
-
nmodules: number;
|
|
196
|
-
linked_modules: string;
|
|
197
|
-
};
|
|
198
|
-
getCommand(cmd: CMD.ROUTINES): {
|
|
199
|
-
init_address: number | bigint;
|
|
200
|
-
init_module: number | bigint;
|
|
201
|
-
reserved1: number | bigint;
|
|
202
|
-
reserved2: number | bigint;
|
|
203
|
-
reserved3: number | bigint;
|
|
204
|
-
reserved4: number | bigint;
|
|
205
|
-
reserved5: number | bigint;
|
|
206
|
-
reserved6: number | bigint;
|
|
207
|
-
};
|
|
208
|
-
getCommand(cmd: CMD.SUB_FRAMEWORK): string;
|
|
209
|
-
getCommand(cmd: CMD.SUB_UMBRELLA): string;
|
|
210
|
-
getCommand(cmd: CMD.SUB_CLIENT): string;
|
|
211
|
-
getCommand(cmd: CMD.SUB_LIBRARY): string;
|
|
212
|
-
getCommand(cmd: CMD.TWOLEVEL_HINTS): {
|
|
213
|
-
sub_image: number | bigint;
|
|
214
|
-
toc: number | bigint;
|
|
215
|
-
}[] | undefined;
|
|
216
|
-
getCommand(cmd: CMD.PREBIND_CKSUM): {
|
|
217
|
-
cksum: number;
|
|
218
|
-
};
|
|
219
|
-
getCommand(cmd: CMD.LOAD_WEAK_DYLIB): {
|
|
220
|
-
name: string;
|
|
221
|
-
timestamp: number;
|
|
222
|
-
current_version: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
223
|
-
compatibility_version: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
224
|
-
};
|
|
225
|
-
getCommand(cmd: CMD.SEGMENT_64): {
|
|
226
|
-
data: binary.MappedMemory | undefined;
|
|
227
|
-
segname: string;
|
|
228
|
-
vmaddr: bigint;
|
|
229
|
-
vmsize: bigint;
|
|
230
|
-
fileoff: bigint;
|
|
231
|
-
filesize: bigint;
|
|
232
|
-
maxprot: number;
|
|
233
|
-
initprot: number;
|
|
234
|
-
nsects: number;
|
|
235
|
-
flags: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
236
|
-
sections: Record<string, any> | undefined;
|
|
258
|
+
23: {
|
|
259
|
+
cksum: binary.TypeT<number>;
|
|
237
260
|
};
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
getCommand(cmd: CMD.RPATH): string;
|
|
252
|
-
getCommand(cmd: CMD.CODE_SIGNATURE): Uint8Array | undefined;
|
|
253
|
-
getCommand(cmd: CMD.SEGMENT_SPLIT_INFO): Uint8Array | undefined;
|
|
254
|
-
getCommand(cmd: CMD.REEXPORT_DYLIB): {
|
|
255
|
-
name: string;
|
|
256
|
-
timestamp: number;
|
|
257
|
-
current_version: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
258
|
-
compatibility_version: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
259
|
-
};
|
|
260
|
-
getCommand(cmd: CMD.LAZY_LOAD_DYLIB): {
|
|
261
|
-
name: string;
|
|
262
|
-
timestamp: number;
|
|
263
|
-
current_version: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
264
|
-
compatibility_version: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
265
|
-
};
|
|
266
|
-
getCommand(cmd: CMD.ENCRYPTION_INFO): {
|
|
267
|
-
cryptoff: number;
|
|
268
|
-
cryptsize: number;
|
|
269
|
-
cryptid: number;
|
|
270
|
-
};
|
|
271
|
-
getCommand(cmd: CMD.DYLD_INFO): {
|
|
272
|
-
rebase: Uint8Array | undefined;
|
|
273
|
-
bind: Uint8Array | undefined;
|
|
274
|
-
weak_bind: Uint8Array | undefined;
|
|
275
|
-
lazy_bind: Uint8Array | undefined;
|
|
276
|
-
exprt: Uint8Array | undefined;
|
|
277
|
-
};
|
|
278
|
-
getCommand(cmd: CMD.DYLD_INFO_ONLY): {
|
|
279
|
-
rebase: Uint8Array | undefined;
|
|
280
|
-
bind: Uint8Array | undefined;
|
|
281
|
-
weak_bind: Uint8Array | undefined;
|
|
282
|
-
lazy_bind: Uint8Array | undefined;
|
|
283
|
-
exprt: Uint8Array | undefined;
|
|
284
|
-
};
|
|
285
|
-
getCommand(cmd: CMD.LOAD_UPWARD_DYLIB): {
|
|
286
|
-
name: string;
|
|
287
|
-
timestamp: number;
|
|
288
|
-
current_version: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
289
|
-
compatibility_version: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
290
|
-
};
|
|
291
|
-
getCommand(cmd: CMD.VERSION_MIN_MACOSX): {
|
|
292
|
-
version: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
293
|
-
reserved: number;
|
|
294
|
-
};
|
|
295
|
-
getCommand(cmd: CMD.VERSION_MIN_IPHONEOS): {
|
|
296
|
-
version: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
297
|
-
reserved: number;
|
|
298
|
-
};
|
|
299
|
-
getCommand(cmd: CMD.FUNCTION_STARTS): {
|
|
300
|
-
data: Uint8Array;
|
|
301
|
-
contents: (number | bigint)[];
|
|
302
|
-
};
|
|
303
|
-
getCommand(cmd: CMD.DYLD_ENVIRONMENT): string;
|
|
304
|
-
getCommand(cmd: CMD.MAIN): {
|
|
305
|
-
entryoff: number;
|
|
306
|
-
stacksize: number;
|
|
307
|
-
};
|
|
308
|
-
getCommand(cmd: CMD.DATA_IN_CODE): {
|
|
309
|
-
data: Uint8Array;
|
|
310
|
-
contents: {
|
|
311
|
-
offset: binary.hex<number | bigint>;
|
|
312
|
-
length: number;
|
|
313
|
-
kind: string;
|
|
314
|
-
}[];
|
|
315
|
-
};
|
|
316
|
-
getCommand(cmd: CMD.SOURCE_VERSION): {
|
|
317
|
-
version: {
|
|
318
|
-
a: number | bigint;
|
|
319
|
-
b: number | bigint;
|
|
320
|
-
c: number | bigint;
|
|
321
|
-
d: number | bigint;
|
|
322
|
-
e: number | bigint;
|
|
261
|
+
27: {
|
|
262
|
+
uuid: binary.TypeT<Uint8Array>;
|
|
263
|
+
};
|
|
264
|
+
29: {
|
|
265
|
+
get(s: mach_stream): Uint8Array | undefined;
|
|
266
|
+
};
|
|
267
|
+
30: {
|
|
268
|
+
get(s: mach_stream): Uint8Array | undefined;
|
|
269
|
+
};
|
|
270
|
+
38: {
|
|
271
|
+
get(s: mach_stream): {
|
|
272
|
+
data: Uint8Array;
|
|
273
|
+
contents: (number | bigint)[];
|
|
323
274
|
};
|
|
324
275
|
};
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
276
|
+
41: {
|
|
277
|
+
get(s: mach_stream): {
|
|
278
|
+
data: Uint8Array;
|
|
279
|
+
contents: {
|
|
280
|
+
offset: binary.hex<number | bigint>;
|
|
281
|
+
length: number;
|
|
282
|
+
kind: string;
|
|
283
|
+
}[];
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
43: {
|
|
287
|
+
get(s: mach_stream): Uint8Array | undefined;
|
|
288
|
+
};
|
|
289
|
+
46: {
|
|
290
|
+
get(s: mach_stream): Uint8Array | undefined;
|
|
291
|
+
};
|
|
292
|
+
2147483699: {
|
|
293
|
+
get(s: mach_stream): Uint8Array | undefined;
|
|
294
|
+
};
|
|
295
|
+
2147483700: {
|
|
296
|
+
get(s: mach_stream): Uint8Array | undefined;
|
|
297
|
+
};
|
|
298
|
+
33: {
|
|
299
|
+
cryptoff: binary.TypeT<number>;
|
|
300
|
+
cryptsize: binary.TypeT<number>;
|
|
301
|
+
cryptid: binary.TypeT<number>;
|
|
302
|
+
};
|
|
303
|
+
44: {
|
|
304
|
+
cryptoff: binary.TypeT<number>;
|
|
305
|
+
cryptsize: binary.TypeT<number>;
|
|
306
|
+
cryptid: binary.TypeT<number>;
|
|
307
|
+
pad: binary.TypeT<number>;
|
|
331
308
|
};
|
|
332
|
-
|
|
333
|
-
|
|
309
|
+
36: {
|
|
310
|
+
version: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
311
|
+
reserved: binary.TypeT<number>;
|
|
334
312
|
};
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
reserved: number;
|
|
313
|
+
37: {
|
|
314
|
+
version: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
315
|
+
reserved: binary.TypeT<number>;
|
|
339
316
|
};
|
|
340
|
-
|
|
341
|
-
version: Record<string, bigint | boolean> | Record<string, number | boolean
|
|
342
|
-
reserved: number
|
|
317
|
+
47: {
|
|
318
|
+
version: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
319
|
+
reserved: binary.TypeT<number>;
|
|
343
320
|
};
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
321
|
+
48: {
|
|
322
|
+
version: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
323
|
+
reserved: binary.TypeT<number>;
|
|
347
324
|
};
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
325
|
+
34: {
|
|
326
|
+
rebase: {
|
|
327
|
+
get(s: mach_stream): Uint8Array | undefined;
|
|
328
|
+
};
|
|
329
|
+
bind: {
|
|
330
|
+
get(s: mach_stream): Uint8Array | undefined;
|
|
331
|
+
};
|
|
332
|
+
weak_bind: {
|
|
333
|
+
get(s: mach_stream): Uint8Array | undefined;
|
|
334
|
+
};
|
|
335
|
+
lazy_bind: {
|
|
336
|
+
get(s: mach_stream): Uint8Array | undefined;
|
|
337
|
+
};
|
|
338
|
+
exprt: {
|
|
339
|
+
get(s: mach_stream): Uint8Array | undefined;
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
2147483682: {
|
|
343
|
+
rebase: {
|
|
344
|
+
get(s: mach_stream): Uint8Array | undefined;
|
|
345
|
+
};
|
|
346
|
+
bind: {
|
|
347
|
+
get(s: mach_stream): Uint8Array | undefined;
|
|
348
|
+
};
|
|
349
|
+
weak_bind: {
|
|
350
|
+
get(s: mach_stream): Uint8Array | undefined;
|
|
351
|
+
};
|
|
352
|
+
lazy_bind: {
|
|
353
|
+
get(s: mach_stream): Uint8Array | undefined;
|
|
354
|
+
};
|
|
355
|
+
exprt: {
|
|
356
|
+
get(s: mach_stream): Uint8Array | undefined;
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
3: {
|
|
360
|
+
get(s: mach_stream): Uint8Array | undefined;
|
|
361
|
+
};
|
|
362
|
+
9: {
|
|
363
|
+
name: {
|
|
364
|
+
get(s: binary.stream): string;
|
|
365
|
+
};
|
|
366
|
+
header_addr: binary.TypeT<number>;
|
|
367
|
+
};
|
|
368
|
+
2147483688: {
|
|
369
|
+
entryoff: binary.TypeT<number>;
|
|
370
|
+
stacksize: binary.TypeT<number>;
|
|
371
|
+
};
|
|
372
|
+
42: {
|
|
373
|
+
version: binary.TypeT<{
|
|
374
|
+
a: number | bigint;
|
|
375
|
+
b: number | bigint;
|
|
376
|
+
c: number | bigint;
|
|
377
|
+
d: number | bigint;
|
|
378
|
+
e: number | bigint;
|
|
379
|
+
}>;
|
|
380
|
+
};
|
|
381
|
+
50: {
|
|
382
|
+
platform: binary.TypeT<string>;
|
|
383
|
+
minos: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
384
|
+
sdk: binary.TypeT<Record<string, bigint | boolean> | Record<string, number | boolean>>;
|
|
385
|
+
tools: binary.TypeT<Record<string, {
|
|
353
386
|
tool: string;
|
|
354
387
|
version: Record<string, bigint | boolean> | Record<string, number | boolean>;
|
|
355
|
-
}
|
|
388
|
+
}>>;
|
|
389
|
+
};
|
|
390
|
+
45: {
|
|
391
|
+
count: binary.TypeT<number>;
|
|
392
|
+
};
|
|
393
|
+
49: {
|
|
394
|
+
data_owner: binary.TypeT<string>;
|
|
395
|
+
data: {
|
|
396
|
+
get(s: mach_stream): Uint8Array | undefined;
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
11: {
|
|
400
|
+
localsym: {
|
|
401
|
+
first: binary.TypeT<number>;
|
|
402
|
+
count: binary.TypeT<number>;
|
|
403
|
+
};
|
|
404
|
+
extdefsym: {
|
|
405
|
+
first: binary.TypeT<number>;
|
|
406
|
+
count: binary.TypeT<number>;
|
|
407
|
+
};
|
|
408
|
+
undefsym: {
|
|
409
|
+
first: binary.TypeT<number>;
|
|
410
|
+
count: binary.TypeT<number>;
|
|
411
|
+
};
|
|
412
|
+
toc: {
|
|
413
|
+
get(s: mach_stream): {
|
|
414
|
+
symbol_index: number;
|
|
415
|
+
module_index: number;
|
|
416
|
+
}[] | undefined;
|
|
417
|
+
};
|
|
418
|
+
modtab: {
|
|
419
|
+
get(s: mach_stream): ({
|
|
420
|
+
objc_module_info_addr: number;
|
|
421
|
+
objc_module_info_size: number;
|
|
422
|
+
module_name: number;
|
|
423
|
+
extdefsym: never;
|
|
424
|
+
refsym: never;
|
|
425
|
+
localsym: never;
|
|
426
|
+
extrel: never;
|
|
427
|
+
init_iterm: never;
|
|
428
|
+
} | {
|
|
429
|
+
objc_module_info_size: number;
|
|
430
|
+
objc_module_info_addr: bigint;
|
|
431
|
+
module_name: number;
|
|
432
|
+
extdefsym: never;
|
|
433
|
+
refsym: never;
|
|
434
|
+
localsym: never;
|
|
435
|
+
extrel: never;
|
|
436
|
+
init_iterm: never;
|
|
437
|
+
})[] | undefined;
|
|
438
|
+
};
|
|
439
|
+
extrefsym: {
|
|
440
|
+
get(s: mach_stream): {
|
|
441
|
+
symbol_index: number | bigint;
|
|
442
|
+
flags: number | bigint;
|
|
443
|
+
}[] | undefined;
|
|
444
|
+
};
|
|
445
|
+
indirectsym: {
|
|
446
|
+
get(s: mach_stream): {
|
|
447
|
+
symbol_index: number | bigint;
|
|
448
|
+
flags: number | bigint;
|
|
449
|
+
}[] | undefined;
|
|
450
|
+
};
|
|
451
|
+
extrel: {
|
|
452
|
+
get(s: mach_stream): {
|
|
453
|
+
address: number;
|
|
454
|
+
symbol_ref: {
|
|
455
|
+
symbol_index: number | bigint;
|
|
456
|
+
flags: number | bigint;
|
|
457
|
+
};
|
|
458
|
+
}[] | undefined;
|
|
459
|
+
};
|
|
460
|
+
locrel: {
|
|
461
|
+
get(s: mach_stream): {
|
|
462
|
+
address: number;
|
|
463
|
+
symbol_ref: {
|
|
464
|
+
symbol_index: number | bigint;
|
|
465
|
+
flags: number | bigint;
|
|
466
|
+
};
|
|
467
|
+
}[] | undefined;
|
|
468
|
+
};
|
|
356
469
|
};
|
|
357
|
-
|
|
358
|
-
|
|
470
|
+
};
|
|
471
|
+
export declare class MachFile {
|
|
472
|
+
static check(data: Uint8Array): boolean;
|
|
473
|
+
header: binary.ReadType<typeof header>;
|
|
474
|
+
commands: {
|
|
475
|
+
cmd: CMD;
|
|
476
|
+
data: any;
|
|
477
|
+
}[];
|
|
478
|
+
constructor(data: Uint8Array, mem?: binary.memory);
|
|
479
|
+
load(data: Uint8Array, be: boolean, bits: 32 | 64, mem?: binary.memory): void;
|
|
480
|
+
getCommand<T extends CMD>(cmd: T): binary.ReadType<typeof cmd_table[T]>;
|
|
359
481
|
getSegment(name: string): {
|
|
360
482
|
data: binary.MappedMemory | undefined;
|
|
361
483
|
segname: string;
|
|
@@ -383,16 +505,8 @@ export declare class MachFile {
|
|
|
383
505
|
} | undefined;
|
|
384
506
|
}
|
|
385
507
|
export declare class FATMachFile {
|
|
386
|
-
archs:
|
|
387
|
-
cputype: string;
|
|
388
|
-
cpusubtype: string | number;
|
|
389
|
-
offset: number;
|
|
390
|
-
size: number;
|
|
391
|
-
align: number;
|
|
392
|
-
contents: MachFile | undefined;
|
|
393
|
-
}[];
|
|
508
|
+
archs: binary.ReadType<typeof fat_arch>[];
|
|
394
509
|
static check(data: Uint8Array): boolean;
|
|
395
510
|
constructor(data: Uint8Array, mem?: binary.memory);
|
|
396
|
-
load(file: binary.endianStream, mem?: binary.memory): void;
|
|
397
511
|
}
|
|
398
512
|
export {};
|