Quick Search:

View

Revision:
Expand:  
Changeset: MAIN:gmcgarry:20110527072349

Diff

Diff from 1.2 to:

Annotations

Annotate by Age | Author | Mixed | None
/fisheye/browse/pcc/pcc-libs/csu/darwin/macho.h

Annotated File View

gmcgarry
1.2
1 /*      $Id: macho.h,v 1.2 2011/05/27 07:23:49 gmcgarry Exp $   */
gmcgarry
1.1
2 /*-
3  * Copyright (c) 2008 Gregory McGarry <g.mcgarry@ieee.org>
4  *
5  * Permission to use, copy, modify, and distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
17
18 #include <stdint.h>
19
20 struct mach_header {
21         uint32_t        magic;
22         uint32_t        cputype;
23         uint32_t        cpusubtype;
24         uint32_t        filetype;
25         uint32_t        ncmds;
26         uint32_t        sizeofcmds;
27         uint32_t        flags;
28 };
29
30 #define LC_SEGMENT      0x01
31
gmcgarry
1.2
32 struct segment_command_32 {
gmcgarry
1.1
33         uint32_t        cmd;
34         uint32_t        cmdsize;
35         char            segname[16];
36         uint32_t        vmaddr;
37         uint32_t        vmsize;
38         uint32_t        fileoff;
39         uint32_t        filesize;
40         uint32_t        maxprot;
41         uint32_t        initprot;
42         uint32_t        nsects;
43         uint32_t        flags;
44 };
45
gmcgarry
1.2
46 struct segment_command_64 {
47         uint32_t        cmd;
48         uint32_t        cmdsize;
49         char            segname[16];
50         uint64_t        vmaddr;
51         uint64_t        vmsize;
52         uint64_t        fileoff;
53         uint64_t        filesize;
54         uint32_t        maxprot;
55         uint32_t        initprot;
56         uint32_t        nsects;
57         uint32_t        flags;
58 };
59
60 struct section_32 {
gmcgarry
1.1
61         char            sectname[16];
62         char            segname[16];
63         uint32_t        addr;
64         uint32_t        size;
65         uint32_t        offset;
66         uint32_t        align;
67         uint32_t        reloff;
68         uint32_t        nreloc;
69         uint32_t        flags;
70         uint32_t        reserved1;
71         uint32_t        reserved2;
72 };
gmcgarry
1.2
73
74 struct section_64 {
75         char            sectname[16];
76         char            segname[16];
77         uint64_t        addr;
78         uint64_t        size;
79         uint32_t        offset;
80         uint32_t        align;
81         uint32_t        reloff;
82         uint32_t        nreloc;
83         uint32_t        flags;
84         uint32_t        reserved1;
85         uint32_t        reserved2;
86 };
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-10-31 18:56 +0100