-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tl;dr usable Ventura 31001 and Monterey AMD VA
- Loading branch information
1 parent
a33ef98
commit 3f0f2b2
Showing
30 changed files
with
912 additions
and
892 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#define ADDRESS_REBASE 1 | ||
#define ADDRESS_BIND 2 | ||
#define ADDRESS_EXPORT 3 | ||
#define ADDRESS_REEXPORT 4 | ||
|
||
@interface Address:NSObject | ||
|
||
@property(assign) int type; | ||
@property(assign) long address; | ||
|
||
@property(retain) NSString* name; | ||
@property(retain) NSString* importName; | ||
@property(assign) int dylibOrdinal; | ||
@property(assign) int addend; | ||
|
||
+(instancetype)rebaseWithAddress:(long)address; | ||
+(instancetype)bindWithAddress:(long)address ordinal:(int)ordinal name:(NSString*)name addend:(int)addend; | ||
+(instancetype)exportWithAddress:(long)address name:(NSString*)name; | ||
+(instancetype)reexportWithName:(NSString*)name importName:(NSString*)importName importOrdinal:(int)ordinal; | ||
|
||
-(BOOL)isRebase; | ||
-(BOOL)isBind; | ||
-(BOOL)isExport; | ||
-(BOOL)isReexport; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
@implementation Address | ||
|
||
+(instancetype)rebaseWithAddress:(long)address | ||
{ | ||
Address* result=Address.alloc.init.autorelease; | ||
result.type=ADDRESS_REBASE; | ||
result.address=address; | ||
return result; | ||
} | ||
|
||
+(instancetype)bindWithAddress:(long)address ordinal:(int)ordinal name:(NSString*)name addend:(int)addend | ||
{ | ||
Address* result=Address.alloc.init.autorelease; | ||
result.type=ADDRESS_BIND; | ||
result.address=address; | ||
result.dylibOrdinal=ordinal; | ||
result.name=name; | ||
result.addend=addend; | ||
return result; | ||
} | ||
|
||
+(instancetype)exportWithAddress:(long)address name:(NSString*)name | ||
{ | ||
Address* result=Address.alloc.init.autorelease; | ||
result.type=ADDRESS_EXPORT; | ||
result.address=address; | ||
result.name=name; | ||
return result; | ||
} | ||
|
||
+(instancetype)reexportWithName:(NSString*)name importName:(NSString*)importName importOrdinal:(int)ordinal | ||
{ | ||
Address* result=Address.alloc.init.autorelease; | ||
result.type=ADDRESS_REEXPORT; | ||
result.name=name; | ||
result.importName=importName; | ||
result.dylibOrdinal=ordinal; | ||
return result; | ||
} | ||
|
||
-(BOOL)isRebase | ||
{ | ||
return self.type==ADDRESS_REBASE; | ||
} | ||
|
||
-(BOOL)isBind | ||
{ | ||
return self.type==ADDRESS_BIND; | ||
} | ||
|
||
-(BOOL)isExport | ||
{ | ||
return self.type==ADDRESS_EXPORT; | ||
} | ||
|
||
-(BOOL)isReexport | ||
{ | ||
return self.type==ADDRESS_REEXPORT; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
@interface CacheFile:NSObject<LocationBase> | ||
|
||
@property(retain) NSMutableData* data; | ||
@property(assign) struct dyld_cache_header* header; | ||
@property(retain) NSArray<Image*>* images; | ||
@property(retain) NSArray<CacheImage*>* images; | ||
@property(retain) NSArray<NSNumber*>* rebaseAddresses; | ||
|
||
-(instancetype)initWithPath:(NSString*)path; | ||
|
||
-(NSArray<Image*>*)imagesWithPathPrefix:(NSString*)path; | ||
-(Image*)imageWithAddress:(long)address; | ||
-(long)maxConstDataMappingAddress; | ||
-(long)maxConstDataSegmentAddress; | ||
|
||
-(CacheImage*)imageWithPath:(NSString*)path; | ||
-(NSArray<CacheImage*>*)imagesWithPathPrefix:(NSString*)path; | ||
-(CacheImage*)imageWithAddress:(long)address; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.