-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathKZMachOSegment.h
36 lines (28 loc) · 1.15 KB
/
KZMachOSegment.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// KZMachOSegment.h
//
// Created by Mike Kasianowicz on 3/29/15.
// Copyright (c) 2015 Mike Kasianowicz. All rights reserved.
//
@import Foundation;
@import MachO;
@class KZMachOSection;
// mostly internal datastructures
@interface KZMachOSegment : NSObject
@property (nonatomic) NSString *name;
@property (nonatomic) const void *address;
@property (nonatomic) UInt64 size;
@property (nonatomic) NSArray *sections;
-(KZMachOSection*)sectionNamed:(NSString*)name;
-(KZMachOSection*)sectionContainingAddress:(const void*)address;
+(instancetype)segmentFromCommand:(struct segment_command*)command withBaseAddress:(const void*)baseAddress;
+(instancetype)segmentFromCommand64:(struct segment_command_64*)command withBaseAddress:(const void*)baseAddress;
@end
@interface KZMachOSection : NSObject
@property (nonatomic) NSString *name;
@property (nonatomic) const void *address;
@property (nonatomic) UInt64 size;
-(BOOL)containsAddress:(const void*)address;
+(instancetype)sectionFromStruct:(struct section*)csection withBaseAddress:(const void*)baseAddress;
+(instancetype)sectionFromStruct64:(struct section_64*)csection withBaseAddress:(const void*)baseAddress;
@end