]> git.sur5r.net Git - cc65/blob - src/common/objdefs.h
Fixed LinuxDoc Tools issues in some verbatim blocks in the Atari document.
[cc65] / src / common / objdefs.h
1 /*****************************************************************************/
2 /*                                                                           */
3 /*                                 objdefs.h                                 */
4 /*                                                                           */
5 /*                          Object file definitions                          */
6 /*                                                                           */
7 /*                                                                           */
8 /*                                                                           */
9 /* (C) 1998-2012, Ullrich von Bassewitz                                      */
10 /*                Roemerstrasse 52                                           */
11 /*                D-70794 Filderstadt                                        */
12 /* EMail:         uz@cc65.org                                                */
13 /*                                                                           */
14 /*                                                                           */
15 /* This software is provided 'as-is', without any expressed or implied       */
16 /* warranty.  In no event will the authors be held liable for any damages    */
17 /* arising from the use of this software.                                    */
18 /*                                                                           */
19 /* Permission is granted to anyone to use this software for any purpose,     */
20 /* including commercial applications, and to alter it and redistribute it    */
21 /* freely, subject to the following restrictions:                            */
22 /*                                                                           */
23 /* 1. The origin of this software must not be misrepresented; you must not   */
24 /*    claim that you wrote the original software. If you use this software   */
25 /*    in a product, an acknowledgment in the product documentation would be  */
26 /*    appreciated but is not required.                                       */
27 /* 2. Altered source versions must be plainly marked as such, and must not   */
28 /*    be misrepresented as being the original software.                      */
29 /* 3. This notice may not be removed or altered from any source              */
30 /*    distribution.                                                          */
31 /*                                                                           */
32 /*****************************************************************************/
33
34
35
36 #ifndef OBJDEFS_H
37 #define OBJDEFS_H
38
39
40
41 /*****************************************************************************/
42 /*                                   Data                                    */
43 /*****************************************************************************/
44
45
46
47 /* Defines for magic and version */
48 #define OBJ_MAGIC       0x616E7A55
49 #define OBJ_VERSION     0x0011
50
51 /* Size of an object file header */
52 #define OBJ_HDR_SIZE    (24*4)
53
54 /* Flag bits */
55 #define OBJ_FLAGS_DBGINFO       0x0001  /* File has debug info */
56 #define OBJ_HAS_DBGINFO(x)      (((x) & OBJ_FLAGS_DBGINFO) != 0)
57
58
59
60 /* Header structure */
61 typedef struct ObjHeader ObjHeader;
62 struct ObjHeader {
63     unsigned long       Magic;          /* 32: Magic number */
64     unsigned            Version;        /* 16: Version number */
65     unsigned            Flags;          /* 16: flags */
66     unsigned long       OptionOffs;     /* 32: Offset to option table */
67     unsigned long       OptionSize;     /* 32: Size of options */
68     unsigned long       FileOffs;       /* 32: Offset to file table */
69     unsigned long       FileSize;       /* 32: Size of files */
70     unsigned long       SegOffs;        /* 32: Offset to segment table */
71     unsigned long       SegSize;        /* 32: Size of segment table */
72     unsigned long       ImportOffs;     /* 32: Offset to import list */
73     unsigned long       ImportSize;     /* 32: Size of import list */
74     unsigned long       ExportOffs;     /* 32: Offset to export list */
75     unsigned long       ExportSize;     /* 32: Size of export list */
76     unsigned long       DbgSymOffs;     /* 32: Offset to list of debug symbols */
77     unsigned long       DbgSymSize;     /* 32: Size of debug symbols */
78     unsigned long       LineInfoOffs;   /* 32: Offset to list of line infos */
79     unsigned long       LineInfoSize;   /* 32: Size of line infos */
80     unsigned long       StrPoolOffs;    /* 32: Offset to string pool */
81     unsigned long       StrPoolSize;    /* 32: Size of string pool */
82     unsigned long       AssertOffs;     /* 32: Offset to assertion table */
83     unsigned long       AssertSize;     /* 32: Size of assertion table */
84     unsigned long       ScopeOffs;      /* 32: Offset into scope table */
85     unsigned long       ScopeSize;      /* 32: Size of scope table */
86     unsigned long       SpanOffs;       /* 32: Offset into span table */
87     unsigned long       SpanSize;       /* 32: Size of span table */
88 };
89
90
91
92 /* End of objdefs.h */
93
94 #endif