home *** CD-ROM | disk | FTP | other *** search
- #import "RelocManager.h"
- #import <mach-o/loader.h>
-
- typedef struct _Segment {
- pointer_t address;
- vm_size_t size;
- pointer_t data;
- vm_address_t maxAddress;
- long displacement;
- pointer_t maxData;
- struct {
- unsigned short readIn : 1;
- } rFlags;
- STR segName;
- } Segment;
-
- typedef struct _Image {
- STR name;
- struct mach_header *header;
- vm_size_t size;
- long mtime;
- unsigned long slide;
- BOOL deallocate;
- } Image;
-
- @interface SegmentManager : RelocManager
- {
- @public
- STR name;
- Image *images;
- int numImages;
- BOOL skipShlibs;
- int imageFd;
- cpu_type_t cpuType;
- }
-
- +newExecutable: (STR)name;
- +newExecutable: (STR)name skipShlibs: (BOOL)skipShlibs withDesc: (int)desc cpuType: (cpu_type_t)type;
- +newCore: (STR)theName;
- +newFile: (STR)theName;
- +newShlib: (STR)theName;
- +newShlib: (STR)theName cpuType: (cpu_type_t)type;
- +newHeader: (struct mach_header *)header withSlide: (unsigned long)size;
- -(int)numCommands: (unsigned long)command
- forHeader: (struct mach_header *)header;
- -(struct symtab_command *)symCmd;
- -(struct dysymtab_command *)dysymCmd;
- -(char *)stringTable;
- -(struct nlist *)symbolTable;
- -(BOOL)isCore;
- -(BOOL)isShlib;
- -(BOOL)isExecutable;
- -(BOOL)validate;
- -(STR)executableName;
- -(long)mtime;
- -(void)getImages;
-
- - (unsigned)getSlide;
- @end
-
-