|
|
1.1 root 1: #import "RelocManager.h"
2: #import <mach-o/loader.h>
3:
4: typedef struct _Segment {
5: pointer_t address;
6: vm_size_t size;
7: pointer_t data;
8: vm_address_t maxAddress;
9: long displacement;
10: pointer_t maxData;
11: struct {
12: unsigned short readIn : 1;
13: } rFlags;
14: STR segName;
15: } Segment;
16:
17: typedef struct _Image {
18: STR name;
19: struct mach_header *header;
20: vm_size_t size;
21: long mtime;
22: BOOL deallocate;
23: } Image;
24:
25: @interface SegmentManager : RelocManager
26: {
27: @public
28: STR name;
29: Image *images;
30: int numImages;
31: BOOL skipShlibs;
32: int imageFd;
33: cpu_type_t cpuType;
34: }
35:
36: +newExecutable: (STR)name;
37: +newExecutable: (STR)name skipShlibs: (BOOL)skipShlibs withDesc: (int)desc cpuType: (cpu_type_t)type;
38: +newCore: (STR)theName;
39: +newFile: (STR)theName;
40: +newShlib: (STR)theName;
41: +newShlib: (STR)theName cpuType: (cpu_type_t)type;
42: +newHeader: (struct mach_header *)header withSize: (int)size;
43: -(int)numCommands: (unsigned long)command
44: forHeader: (struct mach_header *)header;
45: -(struct symtab_command *)symCmd;
46: -(char *)stringTable;
47: -(BOOL)isCore;
48: -(BOOL)isShlib;
49: -(BOOL)isExecutable;
50: -(BOOL)validate;
51: -(STR)executableName;
52: -(long)mtime;
53: -(void)getImages;
54:
55: @end
56:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.