Skip to content
This repository was archived by the owner on Jun 16, 2019. It is now read-only.

Commit cda9020

Browse files
committed
Handle other 3 (!) dylib loader commands
Thanks Igor Skochinsky!
1 parent d9c549c commit cda9020

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/macho.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@
1818
LC_SYMTAB = 2
1919
LC_DYSYMTAB = 0xb
2020
LC_LOAD_DYLIB = 0xc
21+
LC_LOAD_WEAK_DYLIB = 0x80000018
2122
LC_SEGMENT_64 = 0x19
23+
LC_REEXPORT_DYLIB = 0x8000001f
2224
LC_DYLD_INFO = 0x22
2325
LC_DYLD_INFO_ONLY = 0x80000022
26+
LC_LOAD_UPWARD_DYLIB = 0x80000023
2427
LC_VERSION_MIN_MACOSX = 0x24
2528
LC_VERSION_MIN_IPHONEOS = 0x25
2629
LC_FUNCTION_STARTS = 0x26
@@ -155,6 +158,12 @@ def __init__(self, data):
155158
self.__doFunctionStarts(commandBytes)
156159
elif command == LC_LOAD_DYLIB:
157160
self.__doLoadDylib(commandBytes)
161+
elif command == LC_LOAD_WEAK_DYLIB:
162+
self.__doLoadDylib(commandBytes)
163+
elif command == LC_REEXPORT_DYLIB:
164+
self.__doLoadDylib(commandBytes)
165+
elif command == LC_LOAD_UPWARD_DYLIB:
166+
self.__doLoadDylib(commandBytes)
158167
elif command == LC_VERSION_MIN_MACOSX:
159168
self.os = "macosx"
160169
elif command == LC_VERSION_MIN_IPHONEOS:

0 commit comments

Comments
 (0)