lief 0.16.7__cp314-cp314-manylinux_2_28_x86_64.whl

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.

Potentially problematic release.


This version of lief might be problematic. Click here for more details.

@@ -0,0 +1,2680 @@
1
+ from collections.abc import Sequence
2
+ import enum
3
+ import io
4
+ import lief.MachO
5
+ import os
6
+ from typing import Iterator, Optional, Union, overload
7
+
8
+
9
+ import lief
10
+ import lief.objc
11
+
12
+
13
+ class MACHO_TYPES(enum.Enum):
14
+ @staticmethod
15
+ def from_value(arg: int, /) -> MACHO_TYPES: ...
16
+
17
+ def __eq__(self, arg, /) -> bool: ...
18
+
19
+ def __ne__(self, arg, /) -> bool: ...
20
+
21
+ def __int__(self) -> int: ...
22
+
23
+ MAGIC = 4277009102
24
+
25
+ CIGAM = 3472551422
26
+
27
+ MAGIC_64 = 4277009103
28
+
29
+ CIGAM_64 = 3489328638
30
+
31
+ FAT_MAGIC = 3405691582
32
+
33
+ FAT_CIGAM = 3199925962
34
+
35
+ NEURAL_MODEL = 3203398350
36
+
37
+ class X86_RELOCATION(enum.Enum):
38
+ @staticmethod
39
+ def from_value(arg: int, /) -> X86_RELOCATION: ...
40
+
41
+ def __eq__(self, arg, /) -> bool: ...
42
+
43
+ def __ne__(self, arg, /) -> bool: ...
44
+
45
+ def __int__(self) -> int: ...
46
+
47
+ VANILLA = 0
48
+
49
+ PAIR = 1
50
+
51
+ SECTDIFF = 2
52
+
53
+ PB_LA_PTR = 3
54
+
55
+ LOCAL_SECTDIFF = 4
56
+
57
+ TLV = 5
58
+
59
+ class X86_64_RELOCATION(enum.Enum):
60
+ @staticmethod
61
+ def from_value(arg: int, /) -> X86_64_RELOCATION: ...
62
+
63
+ def __eq__(self, arg, /) -> bool: ...
64
+
65
+ def __ne__(self, arg, /) -> bool: ...
66
+
67
+ def __int__(self) -> int: ...
68
+
69
+ UNSIGNED = 0
70
+
71
+ SIGNED = 1
72
+
73
+ BRANCH = 2
74
+
75
+ GOT_LOAD = 3
76
+
77
+ GOT = 4
78
+
79
+ SUBTRACTOR = 5
80
+
81
+ SIGNED_1 = 6
82
+
83
+ SIGNED_2 = 7
84
+
85
+ SIGNED_4 = 8
86
+
87
+ TLV = 9
88
+
89
+ class PPC_RELOCATION(enum.Enum):
90
+ @staticmethod
91
+ def from_value(arg: int, /) -> PPC_RELOCATION: ...
92
+
93
+ def __eq__(self, arg, /) -> bool: ...
94
+
95
+ def __ne__(self, arg, /) -> bool: ...
96
+
97
+ def __int__(self) -> int: ...
98
+
99
+ VANILLA = 0
100
+
101
+ PAIR = 1
102
+
103
+ BR14 = 2
104
+
105
+ BR24 = 3
106
+
107
+ HI16 = 4
108
+
109
+ LO16 = 5
110
+
111
+ HA16 = 6
112
+
113
+ LO14 = 7
114
+
115
+ SECTDIFF = 8
116
+
117
+ PB_LA_PTR = 9
118
+
119
+ HI16_SECTDIFF = 10
120
+
121
+ LO16_SECTDIFF = 11
122
+
123
+ HA16_SECTDIFF = 12
124
+
125
+ JBSR = 13
126
+
127
+ LO14_SECTDIFF = 14
128
+
129
+ LOCAL_SECTDIFF = 15
130
+
131
+ class ARM_RELOCATION(enum.Enum):
132
+ @staticmethod
133
+ def from_value(arg: int, /) -> ARM_RELOCATION: ...
134
+
135
+ def __eq__(self, arg, /) -> bool: ...
136
+
137
+ def __ne__(self, arg, /) -> bool: ...
138
+
139
+ def __int__(self) -> int: ...
140
+
141
+ VANILLA = 0
142
+
143
+ PAIR = 1
144
+
145
+ SECTDIFF = 2
146
+
147
+ LOCAL_SECTDIFF = 3
148
+
149
+ PB_LA_PTR = 4
150
+
151
+ BR24 = 5
152
+
153
+ THUMB_RELOC_BR22 = 6
154
+
155
+ THUMB_32BIT_BRANCH = 7
156
+
157
+ HALF = 8
158
+
159
+ HALF_SECTDIFF = 9
160
+
161
+ class ARM64_RELOCATION(enum.Enum):
162
+ @staticmethod
163
+ def from_value(arg: int, /) -> ARM64_RELOCATION: ...
164
+
165
+ def __eq__(self, arg, /) -> bool: ...
166
+
167
+ def __ne__(self, arg, /) -> bool: ...
168
+
169
+ def __int__(self) -> int: ...
170
+
171
+ UNSIGNED = 0
172
+
173
+ SUBTRACTOR = 1
174
+
175
+ BRANCH26 = 2
176
+
177
+ PAGE21 = 3
178
+
179
+ PAGEOFF12 = 4
180
+
181
+ GOT_LOAD_PAGE21 = 5
182
+
183
+ GOT_LOAD_PAGEOFF12 = 6
184
+
185
+ POINTER_TO_GOT = 7
186
+
187
+ TLVP_LOAD_PAGE21 = 8
188
+
189
+ TLVP_LOAD_PAGEOFF12 = 9
190
+
191
+ ADDEND = 10
192
+
193
+ class DYLD_CHAINED_FORMAT(enum.Enum):
194
+ @staticmethod
195
+ def from_value(arg: int, /) -> DYLD_CHAINED_FORMAT: ...
196
+
197
+ def __eq__(self, arg, /) -> bool: ...
198
+
199
+ def __ne__(self, arg, /) -> bool: ...
200
+
201
+ def __int__(self) -> int: ...
202
+
203
+ IMPORT = 1
204
+
205
+ IMPORT_ADDEND = 2
206
+
207
+ IMPORT_ADDEND64 = 3
208
+
209
+ class DYLD_CHAINED_PTR_FORMAT(enum.Enum):
210
+ @staticmethod
211
+ def from_value(arg: int, /) -> DYLD_CHAINED_PTR_FORMAT: ...
212
+
213
+ def __eq__(self, arg, /) -> bool: ...
214
+
215
+ def __ne__(self, arg, /) -> bool: ...
216
+
217
+ def __int__(self) -> int: ...
218
+
219
+ NONE = 0
220
+
221
+ PTR_ARM64E = 1
222
+
223
+ PTR_64 = 2
224
+
225
+ PTR_32 = 3
226
+
227
+ PTR_32_CACHE = 4
228
+
229
+ PTR_32_FIRMWARE = 5
230
+
231
+ PTR_64_OFFSET = 6
232
+
233
+ PTR_ARM64E_KERNEL = 7
234
+
235
+ PTR_64_KERNEL_CACHE = 8
236
+
237
+ PTR_ARM64E_USERLAND = 9
238
+
239
+ PTR_ARM64E_FIRMWARE = 10
240
+
241
+ PTR_X86_64_KERNEL_CACHE = 11
242
+
243
+ PTR_ARM64E_USERLAND24 = 12
244
+
245
+ class ParserConfig:
246
+ def __init__(self) -> None: ...
247
+
248
+ parse_dyld_exports: bool
249
+
250
+ parse_dyld_bindings: bool
251
+
252
+ parse_dyld_rebases: bool
253
+
254
+ fix_from_memory: bool
255
+
256
+ from_dyld_shared_cache: bool
257
+
258
+ def full_dyldinfo(self, flag: bool) -> ParserConfig: ...
259
+
260
+ deep: ParserConfig = ...
261
+
262
+ quick: ParserConfig = ...
263
+
264
+ @overload
265
+ def parse(filename: str, config: ParserConfig = ...) -> Optional[FatBinary]: ...
266
+
267
+ @overload
268
+ def parse(raw: Sequence[int], config: ParserConfig = ...) -> Optional[FatBinary]: ...
269
+
270
+ @overload
271
+ def parse(obj: Union[io.IOBase | os.PathLike], config: ParserConfig = ...) -> Optional[FatBinary]: ...
272
+
273
+ def parse_from_memory(address: int, config: ParserConfig = ...) -> Optional[FatBinary]: ...
274
+
275
+ class ChainedPointerAnalysis:
276
+ class dyld_chained_ptr_arm64e_rebase_t:
277
+ @property
278
+ def unpack_target(self) -> int: ...
279
+
280
+ @property
281
+ def target(self) -> int: ...
282
+
283
+ @property
284
+ def high8(self) -> int: ...
285
+
286
+ @property
287
+ def next(self) -> int: ...
288
+
289
+ @property
290
+ def bind(self) -> bool: ...
291
+
292
+ @property
293
+ def auth(self) -> bool: ...
294
+
295
+ def __str__(self) -> str: ...
296
+
297
+ class dyld_chained_ptr_arm64e_bind_t:
298
+ @property
299
+ def ordinal(self) -> int: ...
300
+
301
+ @property
302
+ def zero(self) -> int: ...
303
+
304
+ @property
305
+ def addend(self) -> int: ...
306
+
307
+ @property
308
+ def next(self) -> int: ...
309
+
310
+ @property
311
+ def bind(self) -> bool: ...
312
+
313
+ @property
314
+ def auth(self) -> bool: ...
315
+
316
+ def __str__(self) -> str: ...
317
+
318
+ class dyld_chained_ptr_arm64e_auth_rebase_t:
319
+ @property
320
+ def target(self) -> int: ...
321
+
322
+ @property
323
+ def diversity(self) -> int: ...
324
+
325
+ @property
326
+ def addr_div(self) -> int: ...
327
+
328
+ @property
329
+ def key(self) -> int: ...
330
+
331
+ @property
332
+ def next(self) -> int: ...
333
+
334
+ @property
335
+ def bind(self) -> bool: ...
336
+
337
+ @property
338
+ def auth(self) -> int: ...
339
+
340
+ def __str__(self) -> str: ...
341
+
342
+ class dyld_chained_ptr_arm64e_auth_bind_t:
343
+ @property
344
+ def ordinal(self) -> int: ...
345
+
346
+ @property
347
+ def zero(self) -> int: ...
348
+
349
+ @property
350
+ def diversity(self) -> int: ...
351
+
352
+ @property
353
+ def addr_div(self) -> int: ...
354
+
355
+ @property
356
+ def key(self) -> int: ...
357
+
358
+ @property
359
+ def next(self) -> int: ...
360
+
361
+ @property
362
+ def bind(self) -> bool: ...
363
+
364
+ @property
365
+ def auth(self) -> bool: ...
366
+
367
+ def __str__(self) -> str: ...
368
+
369
+ class dyld_chained_ptr_64_rebase_t:
370
+ @property
371
+ def unpack_target(self) -> int: ...
372
+
373
+ @property
374
+ def target(self) -> int: ...
375
+
376
+ @property
377
+ def high8(self) -> int: ...
378
+
379
+ @property
380
+ def reserved(self) -> int: ...
381
+
382
+ @property
383
+ def next(self) -> int: ...
384
+
385
+ @property
386
+ def bind(self) -> bool: ...
387
+
388
+ def __str__(self) -> str: ...
389
+
390
+ class dyld_chained_ptr_arm64e_bind24_t:
391
+ @property
392
+ def ordinal(self) -> int: ...
393
+
394
+ @property
395
+ def zero(self) -> int: ...
396
+
397
+ @property
398
+ def addend(self) -> int: ...
399
+
400
+ @property
401
+ def next(self) -> int: ...
402
+
403
+ @property
404
+ def bind(self) -> bool: ...
405
+
406
+ @property
407
+ def auth(self) -> bool: ...
408
+
409
+ def __str__(self) -> str: ...
410
+
411
+ class dyld_chained_ptr_arm64e_auth_bind24_t:
412
+ @property
413
+ def ordinal(self) -> int: ...
414
+
415
+ @property
416
+ def zero(self) -> int: ...
417
+
418
+ @property
419
+ def diversity(self) -> int: ...
420
+
421
+ @property
422
+ def addr_div(self) -> int: ...
423
+
424
+ @property
425
+ def key(self) -> int: ...
426
+
427
+ @property
428
+ def next(self) -> int: ...
429
+
430
+ @property
431
+ def bind(self) -> bool: ...
432
+
433
+ @property
434
+ def auth(self) -> bool: ...
435
+
436
+ def __str__(self) -> str: ...
437
+
438
+ class dyld_chained_ptr_64_bind_t:
439
+ @property
440
+ def ordinal(self) -> int: ...
441
+
442
+ @property
443
+ def addend(self) -> int: ...
444
+
445
+ @property
446
+ def reserved(self) -> int: ...
447
+
448
+ @property
449
+ def next(self) -> int: ...
450
+
451
+ @property
452
+ def bind(self) -> bool: ...
453
+
454
+ def __str__(self) -> str: ...
455
+
456
+ class dyld_chained_ptr_64_kernel_cache_rebase_t:
457
+ @property
458
+ def ordinal(self) -> int: ...
459
+
460
+ @property
461
+ def cache_level(self) -> int: ...
462
+
463
+ @property
464
+ def diversity(self) -> int: ...
465
+
466
+ @property
467
+ def addr_div(self) -> int: ...
468
+
469
+ @property
470
+ def key(self) -> int: ...
471
+
472
+ @property
473
+ def next(self) -> int: ...
474
+
475
+ @property
476
+ def is_auth(self) -> bool: ...
477
+
478
+ def __str__(self) -> str: ...
479
+
480
+ class dyld_chained_ptr_32_rebase_t:
481
+ @property
482
+ def target(self) -> int: ...
483
+
484
+ @property
485
+ def next(self) -> int: ...
486
+
487
+ @property
488
+ def bind(self) -> int: ...
489
+
490
+ def __str__(self) -> str: ...
491
+
492
+ class dyld_chained_ptr_32_bind_t:
493
+ @property
494
+ def ordinal(self) -> int: ...
495
+
496
+ @property
497
+ def addend(self) -> int: ...
498
+
499
+ @property
500
+ def next(self) -> int: ...
501
+
502
+ @property
503
+ def bind(self) -> bool: ...
504
+
505
+ def __str__(self) -> str: ...
506
+
507
+ class dyld_chained_ptr_32_cache_rebase_t:
508
+ @property
509
+ def target(self) -> int: ...
510
+
511
+ @property
512
+ def next(self) -> int: ...
513
+
514
+ def __str__(self) -> str: ...
515
+
516
+ class dyld_chained_ptr_32_firmware_rebase_t:
517
+ @property
518
+ def target(self) -> int: ...
519
+
520
+ @property
521
+ def next(self) -> int: ...
522
+
523
+ def __str__(self) -> str: ...
524
+
525
+ @staticmethod
526
+ def stride(fmt: DYLD_CHAINED_PTR_FORMAT) -> int: ...
527
+
528
+ @staticmethod
529
+ def from_value(ptr: int, size: int) -> Optional[ChainedPointerAnalysis]: ...
530
+
531
+ @property
532
+ def value(self) -> int: ...
533
+
534
+ @property
535
+ def size(self) -> int: ...
536
+
537
+ @property
538
+ def dyld_chained_ptr_arm64e_rebase(self) -> ChainedPointerAnalysis.dyld_chained_ptr_arm64e_rebase_t: ...
539
+
540
+ @property
541
+ def dyld_chained_ptr_arm64e_bind(self) -> ChainedPointerAnalysis.dyld_chained_ptr_arm64e_bind_t: ...
542
+
543
+ @property
544
+ def dyld_chained_ptr_arm64e_auth_rebase(self) -> ChainedPointerAnalysis.dyld_chained_ptr_arm64e_auth_rebase_t: ...
545
+
546
+ @property
547
+ def dyld_chained_ptr_arm64e_auth_bind(self) -> ChainedPointerAnalysis.dyld_chained_ptr_arm64e_auth_bind_t: ...
548
+
549
+ @property
550
+ def dyld_chained_ptr_64_rebase(self) -> ChainedPointerAnalysis.dyld_chained_ptr_64_rebase_t: ...
551
+
552
+ @property
553
+ def dyld_chained_ptr_arm64e_bind24(self) -> ChainedPointerAnalysis.dyld_chained_ptr_arm64e_bind24_t: ...
554
+
555
+ @property
556
+ def dyld_chained_ptr_arm64e_auth_bind24(self) -> ChainedPointerAnalysis.dyld_chained_ptr_arm64e_auth_bind24_t: ...
557
+
558
+ @property
559
+ def dyld_chained_ptr_64_bind(self) -> ChainedPointerAnalysis.dyld_chained_ptr_64_bind_t: ...
560
+
561
+ @property
562
+ def dyld_chained_ptr_64_kernel_cache_rebase(self) -> ChainedPointerAnalysis.dyld_chained_ptr_64_kernel_cache_rebase_t: ...
563
+
564
+ @property
565
+ def dyld_chained_ptr_32_rebase(self) -> ChainedPointerAnalysis.dyld_chained_ptr_32_rebase_t: ...
566
+
567
+ @property
568
+ def dyld_chained_ptr_32_bind(self) -> ChainedPointerAnalysis.dyld_chained_ptr_32_bind_t: ...
569
+
570
+ @property
571
+ def dyld_chained_ptr_32_cache_rebase(self) -> ChainedPointerAnalysis.dyld_chained_ptr_32_cache_rebase_t: ...
572
+
573
+ @property
574
+ def dyld_chained_ptr_32_firmware_rebase(self) -> ChainedPointerAnalysis.dyld_chained_ptr_32_firmware_rebase_t: ...
575
+
576
+ def get_as(self, arg: DYLD_CHAINED_PTR_FORMAT, /) -> Union[lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_arm64e_rebase_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_arm64e_bind_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_arm64e_auth_rebase_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_arm64e_auth_bind_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_64_rebase_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_arm64e_bind24_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_arm64e_auth_bind24_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_64_bind_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_64_kernel_cache_rebase_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_32_rebase_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_32_bind_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_32_cache_rebase_t, lief.MachO.ChainedPointerAnalysis.dyld_chained_ptr_32_firmware_rebase_t, int, None]: ...
577
+
578
+ class FatBinary:
579
+ class it_binaries:
580
+ def __getitem__(self, arg: int, /) -> Binary: ...
581
+
582
+ def __len__(self) -> int: ...
583
+
584
+ def __iter__(self) -> FatBinary.it_binaries: ...
585
+
586
+ def __next__(self) -> Binary: ...
587
+
588
+ @property
589
+ def size(self) -> int: ...
590
+
591
+ def at(self, index: int) -> Binary: ...
592
+
593
+ def take(self, cpu: Header.CPU_TYPE) -> Optional[Binary]: ...
594
+
595
+ def write(self, filename: str) -> None: ...
596
+
597
+ def raw(self) -> list[int]: ...
598
+
599
+ def __len__(self) -> int: ...
600
+
601
+ def __getitem__(self, arg: int, /) -> Binary: ...
602
+
603
+ def __iter__(self) -> FatBinary.it_binaries: ...
604
+
605
+ def __str__(self) -> str: ...
606
+
607
+ class Binary(lief.Binary):
608
+ class it_commands:
609
+ def __getitem__(self, arg: int, /) -> LoadCommand: ...
610
+
611
+ def __len__(self) -> int: ...
612
+
613
+ def __iter__(self) -> Binary.it_commands: ...
614
+
615
+ def __next__(self) -> LoadCommand: ...
616
+
617
+ class it_symbols:
618
+ def __getitem__(self, arg: int, /) -> Symbol: ...
619
+
620
+ def __len__(self) -> int: ...
621
+
622
+ def __iter__(self) -> Binary.it_symbols: ...
623
+
624
+ def __next__(self) -> Symbol: ...
625
+
626
+ class it_filter_symbols:
627
+ def __getitem__(self, arg: int, /) -> Symbol: ...
628
+
629
+ def __len__(self) -> int: ...
630
+
631
+ def __iter__(self) -> Binary.it_filter_symbols: ...
632
+
633
+ def __next__(self) -> Symbol: ...
634
+
635
+ class it_sections:
636
+ def __getitem__(self, arg: int, /) -> Section: ...
637
+
638
+ def __len__(self) -> int: ...
639
+
640
+ def __iter__(self) -> Binary.it_sections: ...
641
+
642
+ def __next__(self) -> Section: ...
643
+
644
+ class it_segments:
645
+ def __getitem__(self, arg: int, /) -> SegmentCommand: ...
646
+
647
+ def __len__(self) -> int: ...
648
+
649
+ def __iter__(self) -> Binary.it_segments: ...
650
+
651
+ def __next__(self) -> SegmentCommand: ...
652
+
653
+ class it_libraries:
654
+ def __getitem__(self, arg: int, /) -> DylibCommand: ...
655
+
656
+ def __len__(self) -> int: ...
657
+
658
+ def __iter__(self) -> Binary.it_libraries: ...
659
+
660
+ def __next__(self) -> DylibCommand: ...
661
+
662
+ class it_relocations:
663
+ def __getitem__(self, arg: int, /) -> Relocation: ...
664
+
665
+ def __len__(self) -> int: ...
666
+
667
+ def __iter__(self) -> Binary.it_relocations: ...
668
+
669
+ def __next__(self) -> Relocation: ...
670
+
671
+ class it_rpaths:
672
+ def __getitem__(self, arg: int, /) -> RPathCommand: ...
673
+
674
+ def __len__(self) -> int: ...
675
+
676
+ def __iter__(self) -> Binary.it_rpaths: ...
677
+
678
+ def __next__(self) -> RPathCommand: ...
679
+
680
+ class it_sub_clients:
681
+ def __getitem__(self, arg: int, /) -> SubClient: ...
682
+
683
+ def __len__(self) -> int: ...
684
+
685
+ def __iter__(self) -> Binary.it_sub_clients: ...
686
+
687
+ def __next__(self) -> SubClient: ...
688
+
689
+ class range_t:
690
+ start: int
691
+
692
+ end: int
693
+
694
+ @property
695
+ def header(self) -> Header: ... # type: ignore
696
+
697
+ @property
698
+ def sections(self) -> Binary.it_sections: ... # type: ignore
699
+
700
+ @property
701
+ def relocations(self) -> Binary.it_relocations: ... # type: ignore
702
+
703
+ @property
704
+ def segments(self) -> Binary.it_segments: ...
705
+
706
+ @property
707
+ def libraries(self) -> Binary.it_libraries: ... # type: ignore
708
+
709
+ @property
710
+ def symbols(self) -> Binary.it_symbols: ... # type: ignore
711
+
712
+ def has_symbol(self, name: str) -> bool: ...
713
+
714
+ def get_symbol(self, name: str) -> Symbol: ...
715
+
716
+ @property
717
+ def imported_symbols(self) -> Binary.it_filter_symbols: ...
718
+
719
+ @property
720
+ def exported_symbols(self) -> Binary.it_filter_symbols: ...
721
+
722
+ @property
723
+ def commands(self) -> Binary.it_commands: ...
724
+
725
+ @property
726
+ def filesets(self) -> FatBinary.it_binaries: ...
727
+
728
+ @property
729
+ def has_filesets(self) -> bool: ...
730
+
731
+ @property
732
+ def fileset_name(self) -> str: ...
733
+
734
+ @property
735
+ def imagebase(self) -> int: ...
736
+
737
+ @property
738
+ def virtual_size(self) -> int: ...
739
+
740
+ @property
741
+ def fat_offset(self) -> int: ...
742
+
743
+ def section_from_offset(self, arg: int, /) -> Section: ...
744
+
745
+ def section_from_virtual_address(self, arg: int, /) -> Section: ...
746
+
747
+ def segment_from_offset(self, arg: int, /) -> SegmentCommand: ...
748
+
749
+ def segment_from_virtual_address(self, arg: int, /) -> SegmentCommand: ...
750
+
751
+ @property
752
+ def has_entrypoint(self) -> bool: ...
753
+
754
+ @property
755
+ def has_uuid(self) -> bool: ...
756
+
757
+ @property
758
+ def uuid(self) -> UUIDCommand: ...
759
+
760
+ @property
761
+ def has_main_command(self) -> bool: ...
762
+
763
+ @property
764
+ def main_command(self) -> MainCommand: ...
765
+
766
+ @property
767
+ def has_dylinker(self) -> bool: ...
768
+
769
+ @property
770
+ def dylinker(self) -> DylinkerCommand: ...
771
+
772
+ @property
773
+ def has_dyld_info(self) -> bool: ...
774
+
775
+ @property
776
+ def dyld_info(self) -> DyldInfo: ...
777
+
778
+ @property
779
+ def has_function_starts(self) -> bool: ...
780
+
781
+ @property
782
+ def function_starts(self) -> FunctionStarts: ...
783
+
784
+ @property
785
+ def has_source_version(self) -> bool: ...
786
+
787
+ @property
788
+ def source_version(self) -> SourceVersion: ...
789
+
790
+ @property
791
+ def has_version_min(self) -> bool: ...
792
+
793
+ @property
794
+ def version_min(self) -> VersionMin: ...
795
+
796
+ @property
797
+ def has_routine_command(self) -> bool: ...
798
+
799
+ @property
800
+ def routine_command(self) -> Routine: ...
801
+
802
+ @property
803
+ def has_thread_command(self) -> bool: ...
804
+
805
+ @property
806
+ def thread_command(self) -> ThreadCommand: ...
807
+
808
+ @property
809
+ def has_rpath(self) -> bool: ...
810
+
811
+ @property
812
+ def rpath(self) -> RPathCommand: ...
813
+
814
+ @property
815
+ def rpaths(self) -> Binary.it_rpaths: ...
816
+
817
+ @property
818
+ def has_symbol_command(self) -> bool: ...
819
+
820
+ @property
821
+ def symbol_command(self) -> SymbolCommand: ...
822
+
823
+ @property
824
+ def has_dynamic_symbol_command(self) -> bool: ...
825
+
826
+ @property
827
+ def dynamic_symbol_command(self) -> DynamicSymbolCommand: ...
828
+
829
+ @property
830
+ def has_code_signature(self) -> bool: ...
831
+
832
+ @property
833
+ def code_signature(self) -> CodeSignature: ...
834
+
835
+ @property
836
+ def has_code_signature_dir(self) -> bool: ...
837
+
838
+ @property
839
+ def code_signature_dir(self) -> CodeSignatureDir: ...
840
+
841
+ @property
842
+ def has_data_in_code(self) -> bool: ...
843
+
844
+ @property
845
+ def data_in_code(self) -> DataInCode: ...
846
+
847
+ @property
848
+ def has_segment_split_info(self) -> bool: ...
849
+
850
+ @property
851
+ def segment_split_info(self) -> SegmentSplitInfo: ...
852
+
853
+ @property
854
+ def subclients(self) -> Binary.it_sub_clients: ...
855
+
856
+ @property
857
+ def has_subclients(self) -> bool: ...
858
+
859
+ @property
860
+ def has_sub_framework(self) -> bool: ...
861
+
862
+ @property
863
+ def sub_framework(self) -> SubFramework: ...
864
+
865
+ @property
866
+ def has_dyld_environment(self) -> bool: ...
867
+
868
+ @property
869
+ def dyld_environment(self) -> DyldEnvironment: ...
870
+
871
+ @property
872
+ def has_encryption_info(self) -> bool: ...
873
+
874
+ @property
875
+ def encryption_info(self) -> EncryptionInfo: ...
876
+
877
+ @property
878
+ def has_build_version(self) -> bool: ...
879
+
880
+ @property
881
+ def platform(self) -> BuildVersion.PLATFORMS: ...
882
+
883
+ @property
884
+ def is_ios(self) -> bool: ...
885
+
886
+ @property
887
+ def is_macos(self) -> bool: ...
888
+
889
+ @property
890
+ def build_version(self) -> BuildVersion: ...
891
+
892
+ @property
893
+ def has_dyld_chained_fixups(self) -> bool: ...
894
+
895
+ @property
896
+ def dyld_chained_fixups(self) -> DyldChainedFixups: ...
897
+
898
+ @property
899
+ def has_dyld_exports_trie(self) -> bool: ...
900
+
901
+ @property
902
+ def dyld_exports_trie(self) -> DyldExportsTrie: ...
903
+
904
+ @property
905
+ def has_two_level_hints(self) -> bool: ...
906
+
907
+ @property
908
+ def two_level_hints(self) -> TwoLevelHints: ...
909
+
910
+ @property
911
+ def has_linker_opt_hint(self) -> bool: ...
912
+
913
+ @property
914
+ def linker_opt_hint(self) -> LinkerOptHint: ...
915
+
916
+ def virtual_address_to_offset(self, virtual_address: int) -> Union[int, lief.lief_errors]: ...
917
+
918
+ def has_section(self, name: str) -> bool: ...
919
+
920
+ @overload
921
+ def get_section(self, name: str) -> Section: ...
922
+
923
+ @overload
924
+ def get_section(self, segname: str, secname: str) -> Section: ...
925
+
926
+ def has_segment(self, name: str) -> bool: ...
927
+
928
+ def get_segment(self, name: str) -> SegmentCommand: ...
929
+
930
+ @property
931
+ def va_ranges(self) -> Binary.range_t: ...
932
+
933
+ @property
934
+ def off_ranges(self) -> Binary.range_t: ...
935
+
936
+ def is_valid_addr(self, address: int) -> bool: ...
937
+
938
+ @overload
939
+ def write(self, output: str) -> None: ...
940
+
941
+ @overload
942
+ def write(self, output: str, config: Builder.config_t) -> None: ...
943
+
944
+ @overload
945
+ def add(self, dylib_command: DylibCommand) -> LoadCommand: ...
946
+
947
+ @overload
948
+ def add(self, segment: SegmentCommand) -> LoadCommand: ...
949
+
950
+ @overload
951
+ def add(self, load_command: LoadCommand) -> LoadCommand: ...
952
+
953
+ @overload
954
+ def add(self, load_command: LoadCommand, index: int) -> LoadCommand: ...
955
+
956
+ @overload
957
+ def remove(self, load_command: LoadCommand) -> bool: ...
958
+
959
+ @overload
960
+ def remove(self, type: LoadCommand.TYPE) -> bool: ...
961
+
962
+ @overload
963
+ def remove(self, symbol: Symbol) -> bool: ...
964
+
965
+ def remove_command(self, index: int) -> bool: ...
966
+
967
+ @overload
968
+ def remove_section(self, name: str, clear: bool = False) -> None: ...
969
+
970
+ @overload
971
+ def remove_section(self, segname: str, secname: str, clear: bool = False) -> None: ...
972
+
973
+ def remove_signature(self) -> bool: ...
974
+
975
+ def remove_symbol(self, name: str) -> bool: ...
976
+
977
+ def can_remove(self, symbol: Symbol) -> bool: ...
978
+
979
+ def can_remove_symbol(self, symbol_name: str) -> bool: ...
980
+
981
+ @overload
982
+ def unexport(self, name: str) -> bool: ...
983
+
984
+ @overload
985
+ def unexport(self, symbol: Symbol) -> bool: ...
986
+
987
+ def extend(self, load_command: LoadCommand, size: int) -> bool: ...
988
+
989
+ def extend_segment(self, segment_command: SegmentCommand, size: int) -> bool: ...
990
+
991
+ @overload
992
+ def add_section(self, segment: SegmentCommand, section: Section) -> Section: ...
993
+
994
+ @overload
995
+ def add_section(self, section: Section) -> Section: ...
996
+
997
+ def add_library(self, library_name: str) -> LoadCommand: ...
998
+
999
+ def get(self, type: LoadCommand.TYPE) -> LoadCommand: ...
1000
+
1001
+ def has(self, type: LoadCommand.TYPE) -> bool: ...
1002
+
1003
+ @property
1004
+ def unwind_functions(self) -> list[lief.Function]: ...
1005
+
1006
+ @property
1007
+ def functions(self) -> list[lief.Function]: ...
1008
+
1009
+ def shift(self, value: int) -> Union[lief.ok_t, lief.lief_errors]: ...
1010
+
1011
+ def shift_linkedit(self, value: int) -> Union[lief.ok_t, lief.lief_errors]: ...
1012
+
1013
+ def add_exported_function(self, address: int, name: str) -> ExportInfo: ...
1014
+
1015
+ def add_local_symbol(self, address: int, name: str) -> Symbol: ...
1016
+
1017
+ @property
1018
+ def page_size(self) -> int: ...
1019
+
1020
+ @property
1021
+ def bindings(self) -> Iterator[BindingInfo]: ...
1022
+
1023
+ @property
1024
+ def symbol_stubs(self) -> Sequence[Stub]: ...
1025
+
1026
+ @property
1027
+ def has_nx_heap(self) -> bool: ...
1028
+
1029
+ @property
1030
+ def has_nx_stack(self) -> bool: ...
1031
+
1032
+ @property
1033
+ def support_arm64_ptr_auth(self) -> bool: ...
1034
+
1035
+ @property
1036
+ def objc_metadata(self) -> Optional[lief.objc.Metadata]: ...
1037
+
1038
+ def __getitem__(self, arg: LoadCommand.TYPE, /) -> LoadCommand: ...
1039
+
1040
+ def __contains__(self, arg: LoadCommand.TYPE, /) -> bool: ...
1041
+
1042
+ @property
1043
+ def overlay(self) -> memoryview: ...
1044
+
1045
+ def __str__(self) -> str: ...
1046
+
1047
+ class Header(lief.Object):
1048
+ def __init__(self) -> None: ...
1049
+
1050
+ class CPU_TYPE(enum.Enum):
1051
+ @staticmethod
1052
+ def from_value(arg: int, /) -> Header.CPU_TYPE: ...
1053
+
1054
+ def __eq__(self, arg, /) -> bool: ...
1055
+
1056
+ def __ne__(self, arg, /) -> bool: ...
1057
+
1058
+ def __int__(self) -> int: ...
1059
+
1060
+ ANY = -1
1061
+
1062
+ X86 = 7
1063
+
1064
+ X86_64 = 16777223
1065
+
1066
+ MIPS = 8
1067
+
1068
+ MC98000 = 10
1069
+
1070
+ ARM = 12
1071
+
1072
+ ARM64 = 16777228
1073
+
1074
+ SPARC = 14
1075
+
1076
+ POWERPC = 18
1077
+
1078
+ POWERPC64 = 16777234
1079
+
1080
+ class FILE_TYPE(enum.Enum):
1081
+ @staticmethod
1082
+ def from_value(arg: int, /) -> Header.FILE_TYPE: ...
1083
+
1084
+ def __eq__(self, arg, /) -> bool: ...
1085
+
1086
+ def __ne__(self, arg, /) -> bool: ...
1087
+
1088
+ def __int__(self) -> int: ...
1089
+
1090
+ UNKNOWN = 0
1091
+
1092
+ OBJECT = 1
1093
+
1094
+ EXECUTE = 2
1095
+
1096
+ FVMLIB = 3
1097
+
1098
+ CORE = 4
1099
+
1100
+ PRELOAD = 5
1101
+
1102
+ DYLIB = 6
1103
+
1104
+ DYLINKER = 7
1105
+
1106
+ BUNDLE = 8
1107
+
1108
+ DYLIB_STUB = 9
1109
+
1110
+ DSYM = 10
1111
+
1112
+ KEXT_BUNDLE = 11
1113
+
1114
+ class FLAGS(enum.Flag):
1115
+ @staticmethod
1116
+ def from_value(arg: int, /) -> Header.FLAGS: ...
1117
+
1118
+ def __eq__(self, arg, /) -> bool: ...
1119
+
1120
+ def __ne__(self, arg, /) -> bool: ...
1121
+
1122
+ def __int__(self) -> int: ...
1123
+
1124
+ NOUNDEFS = 1
1125
+
1126
+ INCRLINK = 2
1127
+
1128
+ DYLDLINK = 4
1129
+
1130
+ BINDATLOAD = 8
1131
+
1132
+ PREBOUND = 16
1133
+
1134
+ SPLIT_SEGS = 32
1135
+
1136
+ LAZY_INIT = 64
1137
+
1138
+ TWOLEVEL = 128
1139
+
1140
+ FORCE_FLAT = 256
1141
+
1142
+ NOMULTIDEFS = 512
1143
+
1144
+ NOFIXPREBINDING = 1024
1145
+
1146
+ PREBINDABLE = 2048
1147
+
1148
+ ALLMODSBOUND = 4096
1149
+
1150
+ SUBSECTIONS_VIA_SYMBOLS = 8192
1151
+
1152
+ CANONICAL = 16384
1153
+
1154
+ WEAK_DEFINES = 32768
1155
+
1156
+ BINDS_TO_WEAK = 65536
1157
+
1158
+ ALLOW_STACK_EXECUTION = 131072
1159
+
1160
+ ROOT_SAFE = 262144
1161
+
1162
+ SETUID_SAFE = 524288
1163
+
1164
+ NO_REEXPORTED_DYLIBS = 1048576
1165
+
1166
+ PIE = 2097152
1167
+
1168
+ DEAD_STRIPPABLE_DYLIB = 4194304
1169
+
1170
+ HAS_TLV_DESCRIPTORS = 8388608
1171
+
1172
+ NO_HEAP_EXECUTION = 16777216
1173
+
1174
+ APP_EXTENSION_SAFE = 33554432
1175
+
1176
+ magic: MACHO_TYPES
1177
+
1178
+ cpu_type: Header.CPU_TYPE
1179
+
1180
+ cpu_subtype: int
1181
+
1182
+ file_type: Header.FILE_TYPE
1183
+
1184
+ flags: int
1185
+
1186
+ nb_cmds: int
1187
+
1188
+ sizeof_cmds: int
1189
+
1190
+ reserved: int
1191
+
1192
+ @property
1193
+ def flags_list(self) -> list[Header.FLAGS]: ...
1194
+
1195
+ def add(self, flag: Header.FLAGS) -> None: ...
1196
+
1197
+ def remove(self, flag: Header.FLAGS) -> None: ...
1198
+
1199
+ def has(self, flag: Header.FLAGS) -> bool: ...
1200
+
1201
+ def __iadd__(self, arg: Header.FLAGS, /) -> Header: ...
1202
+
1203
+ def __isub__(self, arg: Header.FLAGS, /) -> Header: ...
1204
+
1205
+ def __contains__(self, arg: Header.FLAGS, /) -> bool: ...
1206
+
1207
+ def __str__(self) -> str: ...
1208
+
1209
+ class LoadCommand(lief.Object):
1210
+ def __init__(self) -> None: ...
1211
+
1212
+ class TYPE(enum.Enum):
1213
+ @staticmethod
1214
+ def from_value(arg: int, /) -> LoadCommand.TYPE: ...
1215
+
1216
+ def __eq__(self, arg, /) -> bool: ...
1217
+
1218
+ def __ne__(self, arg, /) -> bool: ...
1219
+
1220
+ def __int__(self) -> int: ...
1221
+
1222
+ UNKNOWN = 0
1223
+
1224
+ SEGMENT = 1
1225
+
1226
+ SYMTAB = 2
1227
+
1228
+ SYMSEG = 3
1229
+
1230
+ THREAD = 4
1231
+
1232
+ UNIXTHREAD = 5
1233
+
1234
+ LOADFVMLIB = 6
1235
+
1236
+ IDFVMLIB = 7
1237
+
1238
+ IDENT = 8
1239
+
1240
+ FVMFILE = 9
1241
+
1242
+ PREPAGE = 10
1243
+
1244
+ DYSYMTAB = 11
1245
+
1246
+ LOAD_DYLIB = 12
1247
+
1248
+ ID_DYLIB = 13
1249
+
1250
+ LOAD_DYLINKER = 14
1251
+
1252
+ ID_DYLINKER = 15
1253
+
1254
+ PREBOUND_DYLIB = 16
1255
+
1256
+ ROUTINES = 17
1257
+
1258
+ SUB_FRAMEWORK = 18
1259
+
1260
+ SUB_UMBRELLA = 19
1261
+
1262
+ SUB_CLIENT = 20
1263
+
1264
+ SUB_LIBRARY = 21
1265
+
1266
+ TWOLEVEL_HINTS = 22
1267
+
1268
+ PREBIND_CKSUM = 23
1269
+
1270
+ LOAD_WEAK_DYLIB = 2147483672
1271
+
1272
+ SEGMENT_64 = 25
1273
+
1274
+ ROUTINES_64 = 26
1275
+
1276
+ UUID = 27
1277
+
1278
+ RPATH = 2147483676
1279
+
1280
+ CODE_SIGNATURE = 29
1281
+
1282
+ SEGMENT_SPLIT_INFO = 30
1283
+
1284
+ REEXPORT_DYLIB = 2147483679
1285
+
1286
+ LAZY_LOAD_DYLIB = 32
1287
+
1288
+ ENCRYPTION_INFO = 33
1289
+
1290
+ DYLD_INFO = 34
1291
+
1292
+ DYLD_INFO_ONLY = 2147483682
1293
+
1294
+ LOAD_UPWARD_DYLIB = 2147483683
1295
+
1296
+ VERSION_MIN_MACOSX = 36
1297
+
1298
+ VERSION_MIN_IPHONEOS = 37
1299
+
1300
+ FUNCTION_STARTS = 38
1301
+
1302
+ DYLD_ENVIRONMENT = 39
1303
+
1304
+ MAIN = 2147483688
1305
+
1306
+ DATA_IN_CODE = 41
1307
+
1308
+ SOURCE_VERSION = 42
1309
+
1310
+ DYLIB_CODE_SIGN_DRS = 43
1311
+
1312
+ ENCRYPTION_INFO_64 = 44
1313
+
1314
+ LINKER_OPTION = 45
1315
+
1316
+ LINKER_OPTIMIZATION_HINT = 46
1317
+
1318
+ VERSION_MIN_TVOS = 47
1319
+
1320
+ VERSION_MIN_WATCHOS = 48
1321
+
1322
+ NOTE = 49
1323
+
1324
+ BUILD_VERSION = 50
1325
+
1326
+ DYLD_EXPORTS_TRIE = 2147483699
1327
+
1328
+ DYLD_CHAINED_FIXUPS = 2147483700
1329
+
1330
+ FILESET_ENTRY = 2147483701
1331
+
1332
+ LIEF_UNKNOWN = 4293787649
1333
+
1334
+ command: LoadCommand.TYPE
1335
+
1336
+ size: int
1337
+
1338
+ data: memoryview
1339
+
1340
+ command_offset: int
1341
+
1342
+ def __str__(self) -> str: ...
1343
+
1344
+ class UUIDCommand(LoadCommand):
1345
+ uuid: list[int]
1346
+
1347
+ def __str__(self) -> str: ...
1348
+
1349
+ class SymbolCommand(LoadCommand):
1350
+ def __init__(self) -> None: ...
1351
+
1352
+ symbol_offset: int
1353
+
1354
+ numberof_symbols: int
1355
+
1356
+ strings_offset: int
1357
+
1358
+ strings_size: int
1359
+
1360
+ def __str__(self) -> str: ...
1361
+
1362
+ class SegmentCommand(LoadCommand):
1363
+ @overload
1364
+ def __init__(self) -> None: ...
1365
+
1366
+ @overload
1367
+ def __init__(self, arg: str, /) -> None: ...
1368
+
1369
+ @overload
1370
+ def __init__(self, arg0: str, arg1: Sequence[int], /) -> None: ...
1371
+
1372
+ class it_sections:
1373
+ def __getitem__(self, arg: int, /) -> Section: ...
1374
+
1375
+ def __len__(self) -> int: ...
1376
+
1377
+ def __iter__(self) -> SegmentCommand.it_sections: ...
1378
+
1379
+ def __next__(self) -> Section: ...
1380
+
1381
+ class it_relocations:
1382
+ def __getitem__(self, arg: int, /) -> Relocation: ...
1383
+
1384
+ def __len__(self) -> int: ...
1385
+
1386
+ def __iter__(self) -> SegmentCommand.it_relocations: ...
1387
+
1388
+ def __next__(self) -> Relocation: ...
1389
+
1390
+ class VM_PROTECTIONS(enum.Enum):
1391
+ @staticmethod
1392
+ def from_value(arg: int, /) -> SegmentCommand.VM_PROTECTIONS: ...
1393
+
1394
+ def __eq__(self, arg, /) -> bool: ...
1395
+
1396
+ def __ne__(self, arg, /) -> bool: ...
1397
+
1398
+ def __int__(self) -> int: ...
1399
+
1400
+ R = 1
1401
+
1402
+ W = 2
1403
+
1404
+ X = 4
1405
+
1406
+ class FLAGS(enum.Enum):
1407
+ @staticmethod
1408
+ def from_value(arg: int, /) -> SegmentCommand.FLAGS: ...
1409
+
1410
+ def __eq__(self, arg, /) -> bool: ...
1411
+
1412
+ def __ne__(self, arg, /) -> bool: ...
1413
+
1414
+ def __int__(self) -> int: ...
1415
+
1416
+ HIGHVM = 1
1417
+
1418
+ FVMLIB = 2
1419
+
1420
+ NORELOC = 4
1421
+
1422
+ PROTECTED_VERSION_1 = 8
1423
+
1424
+ READ_ONLY = 16
1425
+
1426
+ name: Union[str, bytes]
1427
+
1428
+ virtual_address: int
1429
+
1430
+ virtual_size: int
1431
+
1432
+ file_size: int
1433
+
1434
+ file_offset: int
1435
+
1436
+ max_protection: int
1437
+
1438
+ init_protection: int
1439
+
1440
+ numberof_sections: int
1441
+
1442
+ @property
1443
+ def sections(self) -> SegmentCommand.it_sections: ...
1444
+
1445
+ @property
1446
+ def relocations(self) -> SegmentCommand.it_relocations: ...
1447
+
1448
+ @property
1449
+ def index(self) -> int: ...
1450
+
1451
+ content: memoryview
1452
+
1453
+ flags: int
1454
+
1455
+ def has(self, section: Section) -> bool: ...
1456
+
1457
+ def has_section(self, section_name: str) -> bool: ...
1458
+
1459
+ def add_section(self, section: Section) -> Section: ...
1460
+
1461
+ def get_section(self, name: str) -> Section: ...
1462
+
1463
+ def __str__(self) -> str: ...
1464
+
1465
+ class LinkEdit(SegmentCommand):
1466
+ pass
1467
+
1468
+ class Section(lief.Section):
1469
+ @overload
1470
+ def __init__(self) -> None: ...
1471
+
1472
+ @overload
1473
+ def __init__(self, section_name: str) -> None: ...
1474
+
1475
+ @overload
1476
+ def __init__(self, section_name: str, content: Sequence[int]) -> None: ...
1477
+
1478
+ class it_relocations:
1479
+ def __getitem__(self, arg: int, /) -> Relocation: ...
1480
+
1481
+ def __len__(self) -> int: ...
1482
+
1483
+ def __iter__(self) -> Section.it_relocations: ...
1484
+
1485
+ def __next__(self) -> Relocation: ...
1486
+
1487
+ class TYPE(enum.Enum):
1488
+ @staticmethod
1489
+ def from_value(arg: int, /) -> Section.TYPE: ...
1490
+
1491
+ def __eq__(self, arg, /) -> bool: ...
1492
+
1493
+ def __ne__(self, arg, /) -> bool: ...
1494
+
1495
+ def __int__(self) -> int: ...
1496
+
1497
+ REGULAR = 0
1498
+
1499
+ ZEROFILL = 1
1500
+
1501
+ CSTRING_LITERALS = 2
1502
+
1503
+ S_4BYTE_LITERALS = 3
1504
+
1505
+ S_8BYTE_LITERALS = 4
1506
+
1507
+ LITERAL_POINTERS = 5
1508
+
1509
+ NON_LAZY_SYMBOL_POINTERS = 6
1510
+
1511
+ LAZY_SYMBOL_POINTERS = 7
1512
+
1513
+ SYMBOL_STUBS = 8
1514
+
1515
+ MOD_INIT_FUNC_POINTERS = 9
1516
+
1517
+ MOD_TERM_FUNC_POINTERS = 10
1518
+
1519
+ COALESCED = 11
1520
+
1521
+ GB_ZEROFILL = 12
1522
+
1523
+ INTERPOSING = 13
1524
+
1525
+ S_16BYTE_LITERALS = 14
1526
+
1527
+ DTRACE_DOF = 15
1528
+
1529
+ LAZY_DYLIB_SYMBOL_POINTERS = 16
1530
+
1531
+ THREAD_LOCAL_REGULAR = 17
1532
+
1533
+ THREAD_LOCAL_ZEROFILL = 18
1534
+
1535
+ THREAD_LOCAL_VARIABLES = 19
1536
+
1537
+ THREAD_LOCAL_VARIABLE_POINTERS = 20
1538
+
1539
+ THREAD_LOCAL_INIT_FUNCTION_POINTERS = 21
1540
+
1541
+ INIT_FUNC_OFFSETS = 22
1542
+
1543
+ class FLAGS(enum.Flag):
1544
+ @staticmethod
1545
+ def from_value(arg: int, /) -> Section.FLAGS: ...
1546
+
1547
+ def __eq__(self, arg, /) -> bool: ...
1548
+
1549
+ def __ne__(self, arg, /) -> bool: ...
1550
+
1551
+ def __int__(self) -> int: ...
1552
+
1553
+ PURE_INSTRUCTIONS = 2147483648
1554
+
1555
+ NO_TOC = 1073741824
1556
+
1557
+ STRIP_STATIC_SYMS = 536870912
1558
+
1559
+ NO_DEAD_STRIP = 268435456
1560
+
1561
+ LIVE_SUPPORT = 134217728
1562
+
1563
+ SELF_MODIFYING_CODE = 67108864
1564
+
1565
+ DEBUG_INFO = 33554432
1566
+
1567
+ SOME_INSTRUCTIONS = 1024
1568
+
1569
+ EXT_RELOC = 512
1570
+
1571
+ LOC_RELOC = 256
1572
+
1573
+ alignment: int
1574
+
1575
+ relocation_offset: int
1576
+
1577
+ numberof_relocations: int
1578
+
1579
+ type: Section.TYPE
1580
+
1581
+ @property
1582
+ def relocations(self) -> SegmentCommand.it_relocations: ...
1583
+
1584
+ reserved1: int
1585
+
1586
+ reserved2: int
1587
+
1588
+ reserved3: int
1589
+
1590
+ flags: Section.FLAGS
1591
+
1592
+ @property
1593
+ def flags_list(self) -> list[Section.FLAGS]: ...
1594
+
1595
+ @property
1596
+ def segment(self) -> SegmentCommand: ...
1597
+
1598
+ segment_name: str
1599
+
1600
+ @property
1601
+ def has_segment(self) -> bool: ...
1602
+
1603
+ def has(self, flag: Section.FLAGS) -> bool: ...
1604
+
1605
+ def add(self, flag: Section.FLAGS) -> None: ...
1606
+
1607
+ def remove(self, flag: Section.FLAGS) -> None: ...
1608
+
1609
+ def __iadd__(self, arg: Section.FLAGS, /) -> Section: ...
1610
+
1611
+ def __isub__(self, arg: Section.FLAGS, /) -> Section: ...
1612
+
1613
+ def __contains__(self, arg: Section.FLAGS, /) -> bool: ...
1614
+
1615
+ def __str__(self) -> str: ...
1616
+
1617
+ class MainCommand(LoadCommand):
1618
+ def __init__(self, arg0: int, arg1: int, /) -> None: ...
1619
+
1620
+ entrypoint: int
1621
+
1622
+ stack_size: int
1623
+
1624
+ def __str__(self) -> str: ...
1625
+
1626
+ class DynamicSymbolCommand(LoadCommand):
1627
+ class it_indirect_symbols:
1628
+ def __getitem__(self, arg: int, /) -> Symbol: ...
1629
+
1630
+ def __len__(self) -> int: ...
1631
+
1632
+ def __iter__(self) -> DynamicSymbolCommand.it_indirect_symbols: ...
1633
+
1634
+ def __next__(self) -> Symbol: ...
1635
+
1636
+ idx_local_symbol: int
1637
+
1638
+ nb_local_symbols: int
1639
+
1640
+ idx_external_define_symbol: int
1641
+
1642
+ nb_external_define_symbols: int
1643
+
1644
+ idx_undefined_symbol: int
1645
+
1646
+ nb_undefined_symbols: int
1647
+
1648
+ toc_offset: int
1649
+
1650
+ nb_toc: int
1651
+
1652
+ module_table_offset: int
1653
+
1654
+ nb_module_table: int
1655
+
1656
+ external_reference_symbol_offset: int
1657
+
1658
+ nb_external_reference_symbols: int
1659
+
1660
+ indirect_symbol_offset: int
1661
+
1662
+ nb_indirect_symbols: int
1663
+
1664
+ external_relocation_offset: int
1665
+
1666
+ nb_external_relocations: int
1667
+
1668
+ local_relocation_offset: int
1669
+
1670
+ nb_local_relocations: int
1671
+
1672
+ @property
1673
+ def indirect_symbols(self) -> DynamicSymbolCommand.it_indirect_symbols: ...
1674
+
1675
+ def __str__(self) -> str: ...
1676
+
1677
+ class DylinkerCommand(LoadCommand):
1678
+ def __init__(self, arg: str, /) -> None: ...
1679
+
1680
+ name: str
1681
+
1682
+ def __str__(self) -> str: ...
1683
+
1684
+ class DyldInfo(LoadCommand):
1685
+ class REBASE_TYPE(enum.Enum):
1686
+ @staticmethod
1687
+ def from_value(arg: int, /) -> DyldInfo.REBASE_TYPE: ...
1688
+
1689
+ def __eq__(self, arg, /) -> bool: ...
1690
+
1691
+ def __ne__(self, arg, /) -> bool: ...
1692
+
1693
+ def __int__(self) -> int: ...
1694
+
1695
+ POINTER = 1
1696
+
1697
+ TEXT_ABSOLUTE32 = 2
1698
+
1699
+ TEXT_PCREL32 = 3
1700
+
1701
+ THREADED = 102
1702
+
1703
+ class REBASE_OPCODES(enum.Enum):
1704
+ @staticmethod
1705
+ def from_value(arg: int, /) -> DyldInfo.REBASE_OPCODES: ...
1706
+
1707
+ def __eq__(self, arg, /) -> bool: ...
1708
+
1709
+ def __ne__(self, arg, /) -> bool: ...
1710
+
1711
+ def __int__(self) -> int: ...
1712
+
1713
+ DONE = 0
1714
+
1715
+ SET_TYPE_IMM = 16
1716
+
1717
+ SET_SEGMENT_AND_OFFSET_ULEB = 32
1718
+
1719
+ ADD_ADDR_ULEB = 48
1720
+
1721
+ ADD_ADDR_IMM_SCALED = 64
1722
+
1723
+ DO_REBASE_IMM_TIMES = 80
1724
+
1725
+ DO_REBASE_ULEB_TIMES = 96
1726
+
1727
+ DO_REBASE_ADD_ADDR_ULEB = 112
1728
+
1729
+ DO_REBASE_ULEB_TIMES_SKIPPING_ULEB = 128
1730
+
1731
+ class BIND_OPCODES(enum.Enum):
1732
+ @staticmethod
1733
+ def from_value(arg: int, /) -> DyldInfo.BIND_OPCODES: ...
1734
+
1735
+ def __eq__(self, arg, /) -> bool: ...
1736
+
1737
+ def __ne__(self, arg, /) -> bool: ...
1738
+
1739
+ def __int__(self) -> int: ...
1740
+
1741
+ DONE = 0
1742
+
1743
+ SET_DYLIB_ORDINAL_IMM = 16
1744
+
1745
+ SET_DYLIB_ORDINAL_ULEB = 32
1746
+
1747
+ SET_DYLIB_SPECIAL_IMM = 48
1748
+
1749
+ SET_SYMBOL_TRAILING_FLAGS_IMM = 64
1750
+
1751
+ SET_TYPE_IMM = 80
1752
+
1753
+ SET_ADDEND_SLEB = 96
1754
+
1755
+ SET_SEGMENT_AND_OFFSET_ULEB = 112
1756
+
1757
+ ADD_ADDR_ULEB = 128
1758
+
1759
+ DO_BIND = 144
1760
+
1761
+ DO_BIND_ADD_ADDR_ULEB = 160
1762
+
1763
+ DO_BIND_ADD_ADDR_IMM_SCALED = 176
1764
+
1765
+ DO_BIND_ULEB_TIMES_SKIPPING_ULEB = 192
1766
+
1767
+ THREADED_APPLY = 209
1768
+
1769
+ THREADED = 208
1770
+
1771
+ class it_binding_info:
1772
+ def __getitem__(self, arg: int, /) -> DyldBindingInfo: ...
1773
+
1774
+ def __len__(self) -> int: ...
1775
+
1776
+ def __iter__(self) -> DyldInfo.it_binding_info: ...
1777
+
1778
+ def __next__(self) -> DyldBindingInfo: ...
1779
+
1780
+ class it_export_info:
1781
+ def __getitem__(self, arg: int, /) -> ExportInfo: ...
1782
+
1783
+ def __len__(self) -> int: ...
1784
+
1785
+ def __iter__(self) -> DyldInfo.it_export_info: ...
1786
+
1787
+ def __next__(self) -> ExportInfo: ...
1788
+
1789
+ rebase: tuple[int, int]
1790
+
1791
+ rebase_opcodes: memoryview
1792
+
1793
+ @property
1794
+ def show_rebases_opcodes(self) -> str: ...
1795
+
1796
+ bind: tuple[int, int]
1797
+
1798
+ bind_opcodes: memoryview
1799
+
1800
+ @property
1801
+ def show_bind_opcodes(self) -> str: ...
1802
+
1803
+ weak_bind: tuple[int, int]
1804
+
1805
+ weak_bind_opcodes: memoryview
1806
+
1807
+ @property
1808
+ def show_weak_bind_opcodes(self) -> str: ...
1809
+
1810
+ lazy_bind: tuple[int, int]
1811
+
1812
+ lazy_bind_opcodes: memoryview
1813
+
1814
+ @property
1815
+ def show_lazy_bind_opcodes(self) -> str: ...
1816
+
1817
+ @property
1818
+ def bindings(self) -> DyldInfo.it_binding_info: ...
1819
+
1820
+ export_info: tuple[int, int]
1821
+
1822
+ export_trie: memoryview
1823
+
1824
+ @property
1825
+ def exports(self) -> DyldExportsTrie.it_export_info: ...
1826
+
1827
+ @property
1828
+ def show_export_trie(self) -> str: ...
1829
+
1830
+ def set_rebase_offset(self, offset: int) -> None: ...
1831
+
1832
+ def set_rebase_size(self, size: int) -> None: ...
1833
+
1834
+ def set_bind_offset(self, offset: int) -> None: ...
1835
+
1836
+ def set_bind_size(self, size: int) -> None: ...
1837
+
1838
+ def set_weak_bind_offset(self, offset: int) -> None: ...
1839
+
1840
+ def set_weak_bind_size(self, size: int) -> None: ...
1841
+
1842
+ def set_lazy_bind_offset(self, offset: int) -> None: ...
1843
+
1844
+ def set_lazy_bind_size(self, size: int) -> None: ...
1845
+
1846
+ def set_export_offset(self, offset: int) -> None: ...
1847
+
1848
+ def set_export_size(self, size: int) -> None: ...
1849
+
1850
+ def __str__(self) -> str: ...
1851
+
1852
+ class DyldChainedFixups(LoadCommand):
1853
+ class it_binding_info:
1854
+ def __getitem__(self, arg: int, /) -> ChainedBindingInfo: ...
1855
+
1856
+ def __len__(self) -> int: ...
1857
+
1858
+ def __iter__(self) -> DyldChainedFixups.it_binding_info: ...
1859
+
1860
+ def __next__(self) -> ChainedBindingInfo: ...
1861
+
1862
+ class it_chained_starts_in_segments_t:
1863
+ def __getitem__(self, arg: int, /) -> DyldChainedFixups.chained_starts_in_segment: ...
1864
+
1865
+ def __len__(self) -> int: ...
1866
+
1867
+ def __iter__(self) -> DyldChainedFixups.it_chained_starts_in_segments_t: ...
1868
+
1869
+ def __next__(self) -> DyldChainedFixups.chained_starts_in_segment: ...
1870
+
1871
+ class chained_starts_in_segment:
1872
+ @property
1873
+ def offset(self) -> int: ...
1874
+
1875
+ @property
1876
+ def size(self) -> int: ...
1877
+
1878
+ @property
1879
+ def page_size(self) -> int: ...
1880
+
1881
+ @property
1882
+ def segment_offset(self) -> int: ...
1883
+
1884
+ @property
1885
+ def page_start(self) -> list[int]: ...
1886
+
1887
+ @property
1888
+ def pointer_format(self) -> DYLD_CHAINED_PTR_FORMAT: ...
1889
+
1890
+ @property
1891
+ def max_valid_pointer(self) -> int: ...
1892
+
1893
+ @property
1894
+ def page_count(self) -> int: ...
1895
+
1896
+ @property
1897
+ def segment(self) -> SegmentCommand: ...
1898
+
1899
+ def __str__(self) -> str: ...
1900
+
1901
+ data_offset: int
1902
+
1903
+ data_size: int
1904
+
1905
+ @property
1906
+ def payload(self) -> memoryview: ...
1907
+
1908
+ @property
1909
+ def bindings(self) -> DyldChainedFixups.it_binding_info: ...
1910
+
1911
+ @property
1912
+ def chained_starts_in_segments(self) -> DyldChainedFixups.it_chained_starts_in_segments_t: ...
1913
+
1914
+ fixups_version: int
1915
+
1916
+ starts_offset: int
1917
+
1918
+ imports_offset: int
1919
+
1920
+ symbols_offset: int
1921
+
1922
+ imports_count: int
1923
+
1924
+ symbols_format: int
1925
+
1926
+ imports_format: DYLD_CHAINED_FORMAT
1927
+
1928
+ def __str__(self) -> str: ...
1929
+
1930
+ class DyldExportsTrie(LoadCommand):
1931
+ class it_export_info:
1932
+ def __getitem__(self, arg: int, /) -> ExportInfo: ...
1933
+
1934
+ def __len__(self) -> int: ...
1935
+
1936
+ def __iter__(self) -> DyldExportsTrie.it_export_info: ...
1937
+
1938
+ def __next__(self) -> ExportInfo: ...
1939
+
1940
+ data_offset: int
1941
+
1942
+ data_size: int
1943
+
1944
+ @property
1945
+ def content(self) -> memoryview: ...
1946
+
1947
+ @property
1948
+ def exports(self) -> DyldExportsTrie.it_export_info: ...
1949
+
1950
+ def show_export_trie(self) -> str: ...
1951
+
1952
+ def __str__(self) -> str: ...
1953
+
1954
+ class DylibCommand(LoadCommand):
1955
+ name: str
1956
+
1957
+ timestamp: int
1958
+
1959
+ current_version: list[int]
1960
+
1961
+ compatibility_version: list[int]
1962
+
1963
+ @staticmethod
1964
+ def weak_lib(name: str, timestamp: int = 0, current_version: int = 0, compat_version: int = 0) -> DylibCommand: ...
1965
+
1966
+ @staticmethod
1967
+ def id_dylib(name: str, timestamp: int = 0, current_version: int = 0, compat_version: int = 0) -> DylibCommand: ...
1968
+
1969
+ @staticmethod
1970
+ def load_dylib(name: str, timestamp: int = 0, current_version: int = 0, compat_version: int = 0) -> DylibCommand: ...
1971
+
1972
+ @staticmethod
1973
+ def reexport_dylib(name: str, timestamp: int = 0, current_version: int = 0, compat_version: int = 0) -> DylibCommand: ...
1974
+
1975
+ @staticmethod
1976
+ def load_upward_dylib(name: str, timestamp: int = 0, current_version: int = 0, compat_version: int = 0) -> DylibCommand: ...
1977
+
1978
+ @staticmethod
1979
+ def lazy_load_dylib(name: str, timestamp: int = 0, current_version: int = 0, compat_version: int = 0) -> DylibCommand: ...
1980
+
1981
+ def __str__(self) -> str: ...
1982
+
1983
+ class ThreadCommand(LoadCommand):
1984
+ def __init__(self, arg0: int, arg1: int, arg2: Header.CPU_TYPE, /) -> None: ...
1985
+
1986
+ flavor: int
1987
+
1988
+ state: memoryview
1989
+
1990
+ count: int
1991
+
1992
+ @property
1993
+ def pc(self) -> int: ...
1994
+
1995
+ architecture: Header.CPU_TYPE
1996
+
1997
+ def __str__(self) -> str: ...
1998
+
1999
+ class RPathCommand(LoadCommand):
2000
+ @staticmethod
2001
+ def create(path: str) -> Optional[RPathCommand]: ...
2002
+
2003
+ path: str
2004
+
2005
+ def __str__(self) -> str: ...
2006
+
2007
+ class Symbol(lief.Symbol):
2008
+ def __init__(self) -> None: ...
2009
+
2010
+ class CATEGORY(enum.Enum):
2011
+ @staticmethod
2012
+ def from_value(arg: int, /) -> Symbol.CATEGORY: ...
2013
+
2014
+ def __eq__(self, arg, /) -> bool: ...
2015
+
2016
+ def __ne__(self, arg, /) -> bool: ...
2017
+
2018
+ def __int__(self) -> int: ...
2019
+
2020
+ NONE = 0
2021
+
2022
+ LOCAL = 1
2023
+
2024
+ EXTERNAL = 2
2025
+
2026
+ UNDEFINED = 3
2027
+
2028
+ INDIRECT_ABS = 4
2029
+
2030
+ INDIRECT_LOCAL = 5
2031
+
2032
+ INDIRECT_ABS_LOCAL = 6
2033
+
2034
+ class ORIGIN(enum.Enum):
2035
+ @staticmethod
2036
+ def from_value(arg: int, /) -> Symbol.ORIGIN: ...
2037
+
2038
+ def __eq__(self, arg, /) -> bool: ...
2039
+
2040
+ def __ne__(self, arg, /) -> bool: ...
2041
+
2042
+ def __int__(self) -> int: ...
2043
+
2044
+ UNKNOWN = 0
2045
+
2046
+ DYLD_EXPORT = 1
2047
+
2048
+ DYLD_BIND = 2
2049
+
2050
+ LC_SYMTAB = 3
2051
+
2052
+ class TYPE(enum.Enum):
2053
+ @staticmethod
2054
+ def from_value(arg: int, /) -> Symbol.TYPE: ...
2055
+
2056
+ def __eq__(self, arg, /) -> bool: ...
2057
+
2058
+ def __ne__(self, arg, /) -> bool: ...
2059
+
2060
+ def __int__(self) -> int: ...
2061
+
2062
+ UNDEFINED = 0
2063
+
2064
+ ABSOLUTE_SYM = 2
2065
+
2066
+ SECTION = 14
2067
+
2068
+ PREBOUND = 12
2069
+
2070
+ INDIRECT = 10
2071
+
2072
+ @property
2073
+ def demangled_name(self) -> str: ...
2074
+
2075
+ @property
2076
+ def category(self) -> Symbol.CATEGORY: ...
2077
+
2078
+ raw_type: int
2079
+
2080
+ @property
2081
+ def type(self) -> Symbol.TYPE: ...
2082
+
2083
+ numberof_sections: int
2084
+
2085
+ description: int
2086
+
2087
+ @property
2088
+ def has_export_info(self) -> bool: ...
2089
+
2090
+ @property
2091
+ def origin(self) -> Symbol.ORIGIN: ...
2092
+
2093
+ @property
2094
+ def export_info(self) -> ExportInfo: ...
2095
+
2096
+ @property
2097
+ def has_binding_info(self) -> bool: ...
2098
+
2099
+ @property
2100
+ def binding_info(self) -> BindingInfo: ...
2101
+
2102
+ @property
2103
+ def library(self) -> DylibCommand: ...
2104
+
2105
+ @property
2106
+ def is_external(self) -> bool: ...
2107
+
2108
+ @property
2109
+ def library_ordinal(self) -> int: ...
2110
+
2111
+ def __str__(self) -> str: ...
2112
+
2113
+ class Relocation(lief.Relocation):
2114
+ class ORIGIN(enum.Enum):
2115
+ @staticmethod
2116
+ def from_value(arg: int, /) -> Relocation.ORIGIN: ...
2117
+
2118
+ def __eq__(self, arg, /) -> bool: ...
2119
+
2120
+ def __ne__(self, arg, /) -> bool: ...
2121
+
2122
+ def __int__(self) -> int: ...
2123
+
2124
+ UNKNOWN = 0
2125
+
2126
+ DYLDINFO = 1
2127
+
2128
+ RELOC_TABLE = 2
2129
+
2130
+ CHAINED_FIXUPS = 3
2131
+
2132
+ address: int
2133
+
2134
+ pc_relative: bool
2135
+
2136
+ type: Union[lief.MachO.X86_RELOCATION, lief.MachO.X86_64_RELOCATION, lief.MachO.PPC_RELOCATION, lief.MachO.ARM_RELOCATION, lief.MachO.ARM64_RELOCATION, lief.MachO.DyldInfo.REBASE_TYPE, ]
2137
+
2138
+ @property
2139
+ def architecture(self) -> Header.CPU_TYPE: ...
2140
+
2141
+ @property
2142
+ def has_symbol(self) -> bool: ...
2143
+
2144
+ @property
2145
+ def symbol(self) -> Symbol: ...
2146
+
2147
+ @property
2148
+ def has_section(self) -> bool: ...
2149
+
2150
+ @property
2151
+ def section(self) -> Section: ...
2152
+
2153
+ @property
2154
+ def origin(self) -> Relocation.ORIGIN: ...
2155
+
2156
+ @property
2157
+ def has_segment(self) -> bool: ...
2158
+
2159
+ @property
2160
+ def segment(self) -> SegmentCommand: ...
2161
+
2162
+ def __str__(self) -> str: ...
2163
+
2164
+ class RelocationObject(Relocation):
2165
+ value: int
2166
+
2167
+ @property
2168
+ def is_scattered(self) -> bool: ...
2169
+
2170
+ def __str__(self) -> str: ...
2171
+
2172
+ class RelocationDyld(Relocation):
2173
+ def __le__(self, arg: RelocationDyld, /) -> bool: ...
2174
+
2175
+ def __lt__(self, arg: RelocationDyld, /) -> bool: ...
2176
+
2177
+ def __ge__(self, arg: RelocationDyld, /) -> bool: ...
2178
+
2179
+ def __gt__(self, arg: RelocationDyld, /) -> bool: ...
2180
+
2181
+ def __str__(self) -> str: ...
2182
+
2183
+ class RelocationFixup(Relocation):
2184
+ target: int
2185
+
2186
+ next: int
2187
+
2188
+ def __str__(self) -> str: ...
2189
+
2190
+ class BindingInfo(lief.Object):
2191
+ address: int
2192
+
2193
+ library_ordinal: int
2194
+
2195
+ addend: int
2196
+
2197
+ weak_import: bool
2198
+
2199
+ @property
2200
+ def has_library(self) -> bool: ...
2201
+
2202
+ @property
2203
+ def library(self) -> DylibCommand: ...
2204
+
2205
+ @property
2206
+ def has_segment(self) -> bool: ...
2207
+
2208
+ @property
2209
+ def segment(self) -> SegmentCommand: ...
2210
+
2211
+ @property
2212
+ def has_symbol(self) -> bool: ...
2213
+
2214
+ @property
2215
+ def symbol(self) -> Symbol: ...
2216
+
2217
+ def __str__(self) -> str: ...
2218
+
2219
+ class DyldBindingInfo(BindingInfo):
2220
+ class CLASS(enum.Enum):
2221
+ @staticmethod
2222
+ def from_value(arg: int, /) -> DyldBindingInfo.CLASS: ...
2223
+
2224
+ def __eq__(self, arg, /) -> bool: ...
2225
+
2226
+ def __ne__(self, arg, /) -> bool: ...
2227
+
2228
+ def __int__(self) -> int: ...
2229
+
2230
+ WEAK = 1
2231
+
2232
+ LAZY = 2
2233
+
2234
+ STANDARD = 3
2235
+
2236
+ THREADED = 100
2237
+
2238
+ class TYPE(enum.Enum):
2239
+ @staticmethod
2240
+ def from_value(arg: int, /) -> DyldBindingInfo.TYPE: ...
2241
+
2242
+ def __eq__(self, arg, /) -> bool: ...
2243
+
2244
+ def __ne__(self, arg, /) -> bool: ...
2245
+
2246
+ def __int__(self) -> int: ...
2247
+
2248
+ POINTER = 1
2249
+
2250
+ TEXT_ABSOLUTE32 = 2
2251
+
2252
+ TEXT_PCREL32 = 3
2253
+
2254
+ binding_class: DyldBindingInfo.CLASS
2255
+
2256
+ binding_type: DyldBindingInfo.TYPE
2257
+
2258
+ @property
2259
+ def original_offset(self) -> int: ...
2260
+
2261
+ def __str__(self) -> str: ...
2262
+
2263
+ class ExportInfo(lief.Object):
2264
+ class KIND(enum.Enum):
2265
+ @staticmethod
2266
+ def from_value(arg: int, /) -> ExportInfo.KIND: ...
2267
+
2268
+ def __eq__(self, arg, /) -> bool: ...
2269
+
2270
+ def __ne__(self, arg, /) -> bool: ...
2271
+
2272
+ def __int__(self) -> int: ...
2273
+
2274
+ REGULAR = 0
2275
+
2276
+ THREAD_LOCAL_KIND = 1
2277
+
2278
+ ABSOLUTE_KIND = 2
2279
+
2280
+ class FLAGS(enum.Flag):
2281
+ @staticmethod
2282
+ def from_value(arg: int, /) -> ExportInfo.FLAGS: ...
2283
+
2284
+ def __eq__(self, arg, /) -> bool: ...
2285
+
2286
+ def __ne__(self, arg, /) -> bool: ...
2287
+
2288
+ def __int__(self) -> int: ...
2289
+
2290
+ WEAK_DEFINITION = 4
2291
+
2292
+ REEXPORT = 8
2293
+
2294
+ STUB_AND_RESOLVER = 16
2295
+
2296
+ @property
2297
+ def node_offset(self) -> int: ...
2298
+
2299
+ @property
2300
+ def kind(self) -> ExportInfo.KIND: ...
2301
+
2302
+ @property
2303
+ def flags_list(self) -> list[ExportInfo.FLAGS]: ...
2304
+
2305
+ flags: int
2306
+
2307
+ address: int
2308
+
2309
+ @property
2310
+ def alias(self) -> Symbol: ...
2311
+
2312
+ @property
2313
+ def alias_library(self) -> DylibCommand: ...
2314
+
2315
+ @property
2316
+ def has_symbol(self) -> bool: ...
2317
+
2318
+ def has(self, flag: ExportInfo.FLAGS) -> bool: ...
2319
+
2320
+ @property
2321
+ def symbol(self) -> Symbol: ...
2322
+
2323
+ def __str__(self) -> str: ...
2324
+
2325
+ class FunctionStarts(LoadCommand):
2326
+ data_offset: int
2327
+
2328
+ data_size: int
2329
+
2330
+ functions: list[int]
2331
+
2332
+ def add_function(self, address: int) -> None: ...
2333
+
2334
+ @property
2335
+ def content(self) -> memoryview: ...
2336
+
2337
+ def __str__(self) -> str: ...
2338
+
2339
+ class CodeSignature(LoadCommand):
2340
+ data_offset: int
2341
+
2342
+ data_size: int
2343
+
2344
+ @property
2345
+ def content(self) -> memoryview: ...
2346
+
2347
+ def __str__(self) -> str: ...
2348
+
2349
+ class CodeSignatureDir(LoadCommand):
2350
+ data_offset: int
2351
+
2352
+ data_size: int
2353
+
2354
+ @property
2355
+ def content(self) -> memoryview: ...
2356
+
2357
+ def __str__(self) -> str: ...
2358
+
2359
+ class it_data_in_code_entries:
2360
+ def __getitem__(self, arg: int, /) -> DataCodeEntry: ...
2361
+
2362
+ def __len__(self) -> int: ...
2363
+
2364
+ def __iter__(self) -> it_data_in_code_entries: ...
2365
+
2366
+ def __next__(self) -> DataCodeEntry: ...
2367
+
2368
+ class DataInCode(LoadCommand):
2369
+ data_offset: int
2370
+
2371
+ data_size: int
2372
+
2373
+ @property
2374
+ def entries(self) -> it_data_in_code_entries: ...
2375
+
2376
+ def add(self, entry: DataCodeEntry) -> DataInCode: ...
2377
+
2378
+ @property
2379
+ def content(self) -> memoryview: ...
2380
+
2381
+ def __str__(self) -> str: ...
2382
+
2383
+ class DataCodeEntry(lief.Object):
2384
+ class TYPES(enum.Enum):
2385
+ @staticmethod
2386
+ def from_value(arg: int, /) -> DataCodeEntry.TYPES: ...
2387
+
2388
+ def __eq__(self, arg, /) -> bool: ...
2389
+
2390
+ def __ne__(self, arg, /) -> bool: ...
2391
+
2392
+ def __int__(self) -> int: ...
2393
+
2394
+ UNKNOWN = 0
2395
+
2396
+ DATA = 1
2397
+
2398
+ JUMP_TABLE_8 = 2
2399
+
2400
+ JUMP_TABLE_16 = 3
2401
+
2402
+ JUMP_TABLE_32 = 4
2403
+
2404
+ ABS_JUMP_TABLE_32 = 5
2405
+
2406
+ offset: int
2407
+
2408
+ length: int
2409
+
2410
+ type: DataCodeEntry.TYPES
2411
+
2412
+ def __str__(self) -> str: ...
2413
+
2414
+ class SourceVersion(LoadCommand):
2415
+ version: list[int]
2416
+
2417
+ def __str__(self) -> str: ...
2418
+
2419
+ class Routine(LoadCommand):
2420
+ init_address: int
2421
+
2422
+ init_module: int
2423
+
2424
+ reserved1: int
2425
+
2426
+ reserved2: int
2427
+
2428
+ reserved3: int
2429
+
2430
+ reserved4: int
2431
+
2432
+ reserved5: int
2433
+
2434
+ reserved6: int
2435
+
2436
+ def __str__(self) -> str: ...
2437
+
2438
+ class VersionMin(LoadCommand):
2439
+ version: list[int]
2440
+
2441
+ sdk: list[int]
2442
+
2443
+ def __str__(self) -> str: ...
2444
+
2445
+ class SegmentSplitInfo(LoadCommand):
2446
+ data_offset: int
2447
+
2448
+ data_size: int
2449
+
2450
+ @property
2451
+ def content(self) -> memoryview: ...
2452
+
2453
+ def __str__(self) -> str: ...
2454
+
2455
+ class SubFramework(LoadCommand):
2456
+ umbrella: str
2457
+
2458
+ def __str__(self) -> str: ...
2459
+
2460
+ class SubClient(LoadCommand):
2461
+ client: str
2462
+
2463
+ def __str__(self) -> str: ...
2464
+
2465
+ class DyldEnvironment(LoadCommand):
2466
+ value: str
2467
+
2468
+ def __str__(self) -> str: ...
2469
+
2470
+ class EncryptionInfo(LoadCommand):
2471
+ crypt_offset: int
2472
+
2473
+ crypt_size: int
2474
+
2475
+ crypt_id: int
2476
+
2477
+ def __str__(self) -> str: ...
2478
+
2479
+ class BuildVersion(LoadCommand):
2480
+ class PLATFORMS(enum.Enum):
2481
+ @staticmethod
2482
+ def from_value(arg: int, /) -> BuildVersion.PLATFORMS: ...
2483
+
2484
+ def __eq__(self, arg, /) -> bool: ...
2485
+
2486
+ def __ne__(self, arg, /) -> bool: ...
2487
+
2488
+ def __int__(self) -> int: ...
2489
+
2490
+ UNKNOWN = 0
2491
+
2492
+ MACOS = 1
2493
+
2494
+ IOS = 2
2495
+
2496
+ TVOS = 3
2497
+
2498
+ WATCHOS = 4
2499
+
2500
+ BRIDGEOS = 5
2501
+
2502
+ MAC_CATALYST = 6
2503
+
2504
+ IOS_SIMULATOR = 7
2505
+
2506
+ TVOS_SIMULATOR = 8
2507
+
2508
+ WATCHOS_SIMULATOR = 9
2509
+
2510
+ DRIVERKIT = 10
2511
+
2512
+ VISIONOS = 11
2513
+
2514
+ VISIONOS_SIMULATOR = 12
2515
+
2516
+ FIRMWARE = 13
2517
+
2518
+ SEPOS = 14
2519
+
2520
+ ANY = 4294967295
2521
+
2522
+ platform: BuildVersion.PLATFORMS
2523
+
2524
+ minos: list[int]
2525
+
2526
+ sdk: list[int]
2527
+
2528
+ @property
2529
+ def tools(self) -> list[BuildToolVersion]: ...
2530
+
2531
+ def __str__(self) -> str: ...
2532
+
2533
+ class BuildToolVersion(lief.Object):
2534
+ @property
2535
+ def tool(self) -> BuildToolVersion.TOOLS: ...
2536
+
2537
+ @property
2538
+ def version(self) -> list[int]: ...
2539
+
2540
+ def __str__(self) -> str: ...
2541
+
2542
+ class TOOLS(enum.Enum):
2543
+ @staticmethod
2544
+ def from_value(arg: int, /) -> BuildToolVersion.TOOLS: ...
2545
+
2546
+ def __eq__(self, arg, /) -> bool: ...
2547
+
2548
+ def __ne__(self, arg, /) -> bool: ...
2549
+
2550
+ def __int__(self) -> int: ...
2551
+
2552
+ UNKNOWN = 0
2553
+
2554
+ CLANG = 1
2555
+
2556
+ SWIFT = 2
2557
+
2558
+ LD = 3
2559
+
2560
+ LLD = 4
2561
+
2562
+ class FilesetCommand(LoadCommand):
2563
+ name: str
2564
+
2565
+ virtual_address: int
2566
+
2567
+ file_offset: int
2568
+
2569
+ @property
2570
+ def binary(self) -> Binary: ...
2571
+
2572
+ def __str__(self) -> str: ...
2573
+
2574
+ class ChainedBindingInfo(BindingInfo):
2575
+ @property
2576
+ def format(self) -> DYLD_CHAINED_FORMAT: ...
2577
+
2578
+ @property
2579
+ def ptr_format(self) -> DYLD_CHAINED_PTR_FORMAT: ...
2580
+
2581
+ offset: int
2582
+
2583
+ @property
2584
+ def sign_extended_addend(self) -> int: ...
2585
+
2586
+ def __str__(self) -> str: ...
2587
+
2588
+ class TwoLevelHints(LoadCommand):
2589
+ class it_hints_t:
2590
+ def __getitem__(self, arg: int, /) -> int: ...
2591
+
2592
+ def __len__(self) -> int: ...
2593
+
2594
+ def __iter__(self) -> TwoLevelHints.it_hints_t: ...
2595
+
2596
+ def __next__(self) -> int: ...
2597
+
2598
+ @property
2599
+ def hints(self) -> TwoLevelHints.it_hints_t: ...
2600
+
2601
+ @property
2602
+ def content(self) -> memoryview: ...
2603
+
2604
+ def __str__(self) -> str: ...
2605
+
2606
+ class LinkerOptHint(LoadCommand):
2607
+ data_offset: int
2608
+
2609
+ data_size: int
2610
+
2611
+ @property
2612
+ def content(self) -> memoryview: ...
2613
+
2614
+ def __str__(self) -> str: ...
2615
+
2616
+ class IndirectBindingInfo(BindingInfo):
2617
+ pass
2618
+
2619
+ class UnknownCommand(LoadCommand):
2620
+ @property
2621
+ def original_command(self) -> int: ...
2622
+
2623
+ def __str__(self) -> str: ...
2624
+
2625
+ class Stub:
2626
+ def __init__(self, target_info: Stub.target_info_t, address: int, raw_stub: Sequence[int]) -> None: ...
2627
+
2628
+ class target_info_t:
2629
+ @overload
2630
+ def __init__(self) -> None: ...
2631
+
2632
+ @overload
2633
+ def __init__(self, arg0: Header.CPU_TYPE, arg1: int, /) -> None: ...
2634
+
2635
+ arch: Header.CPU_TYPE
2636
+
2637
+ subtype: int
2638
+
2639
+ @property
2640
+ def address(self) -> int: ...
2641
+
2642
+ @property
2643
+ def raw(self) -> memoryview: ...
2644
+
2645
+ @property
2646
+ def target(self) -> Union[int, lief.lief_errors]: ...
2647
+
2648
+ def __str__(self) -> str: ...
2649
+
2650
+ class Builder:
2651
+ class config_t:
2652
+ def __init__(self) -> None: ...
2653
+
2654
+ linkedit: bool
2655
+
2656
+ @overload
2657
+ @staticmethod
2658
+ def write(binary: Binary, output: str) -> Union[lief.ok_t, lief.lief_errors]: ...
2659
+
2660
+ @overload
2661
+ @staticmethod
2662
+ def write(binary: Binary, output: str, config: Builder.config_t) -> Union[lief.ok_t, lief.lief_errors]: ...
2663
+
2664
+ @overload
2665
+ @staticmethod
2666
+ def write(fat_binary: FatBinary, output: str) -> Union[lief.ok_t, lief.lief_errors]: ...
2667
+
2668
+ @overload
2669
+ @staticmethod
2670
+ def write(fat_binary: FatBinary, output: str, config: Builder.config_t) -> Union[lief.ok_t, lief.lief_errors]: ...
2671
+
2672
+ def is_fat(file: str) -> bool: ...
2673
+
2674
+ def is_64(file: str) -> bool: ...
2675
+
2676
+ @overload
2677
+ def check_layout(file: Binary) -> tuple[bool, str]: ...
2678
+
2679
+ @overload
2680
+ def check_layout(file: FatBinary) -> tuple[bool, str]: ...