-
Notifications
You must be signed in to change notification settings - Fork 5
/
gimli_macho.h
50 lines (39 loc) · 1020 Bytes
/
gimli_macho.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
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* Copyright (c) 2007-2009 Message Systems, Inc. All rights reserved
* For licensing information, see:
* https://bitbucket.org/wez/gimli/src/tip/LICENSE
*/
#ifndef GIMLI_MACHO_H
#define GIMLI_MACHO_H
#ifdef __MACH__
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __LP64__
typedef struct segment_command_64 gimli_segment_command;
typedef struct mach_header_64 gimli_mach_header;
typedef struct nlist_64 gimli_nlist;
typedef struct section_64 gimli_section;
# define GIMLI_LC_SEGMENT LC_SEGMENT_64
# define GIMLI_MH_MAGIC MH_MAGIC_64
#else
typedef struct segment_command gimli_segment_command;
typedef struct mach_header gimli_mach_header;
typedef struct nlist gimli_nlist;
typedef struct section gimli_section;
# define GIMLI_LC_SEGMENT LC_SEGMENT
# define GIMLI_MH_MAGIC MH_MAGIC
#endif
struct gimli_macho_object {
char *objname;
gimli_mapped_object_t gobject;
int is_exec;
};
#define gimli_object_is_executable(obj) obj->is_exec
#ifdef __cplusplus
}
#endif
#endif
#endif
/* vim:ts=2:sw=2:et:
*/