* ldlex.l (WILDCHAR): Add the caret and exclamation point
[binutils.git] / include / nlm / external.h
blobeebd1cca9253f15e8c97e154b72a6e4199fdb051
1 /* NLM (NetWare Loadable Module) support for BFD.
2 Copyright 1993, 1994, 2005, 2010 Free Software Foundation, Inc.
4 Written by Fred Fish @ Cygnus Support
6 This file is part of BFD, the Binary File Descriptor library.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21 MA 02110-1301, USA. */
23 /* This file is part of NLM support for BFD, and contains the portions
24 that describe how NLM is represented externally by the BFD library.
25 I.E. it describes the in-file representation of NLM. It requires
26 the nlm/common.h file which contains the portions that are common to
27 both the internal and external representations.
29 Note that an NLM header consists of three parts:
31 (1) A fixed length header that has specific fields of known length,
32 at specific offsets in the file.
34 (2) A variable length header that has specific fields in a specific
35 order, but some fields may be variable length.
37 (3) A auxiliary header that has various optional fields in no specific
38 order. There is no way to identify the end of the auxiliary headers
39 except by finding a header without a recognized 'stamp'.
41 The exact format of the fixed length header unfortunately varies
42 from one NLM target to another, due to padding. Each target
43 defines the correct external format in a separate header file. */
45 /* NLM Header. */
47 /* The version header is one of the optional auxiliary headers and
48 follows the fixed length and variable length NLM headers. */
50 typedef struct nlmNAME(external_version_header)
53 /* The header is recognized by "VeRsIoN#" in the stamp field. */
54 char stamp[8];
56 unsigned char majorVersion[NLM_TARGET_LONG_SIZE];
58 unsigned char minorVersion[NLM_TARGET_LONG_SIZE];
60 unsigned char revision[NLM_TARGET_LONG_SIZE];
62 unsigned char year[NLM_TARGET_LONG_SIZE];
64 unsigned char month[NLM_TARGET_LONG_SIZE];
66 unsigned char day[NLM_TARGET_LONG_SIZE];
68 } NlmNAME(External_Version_Header);
71 typedef struct nlmNAME(external_copyright_header)
74 /* The header is recognized by "CoPyRiGhT=" in the stamp field. */
76 char stamp[10];
78 unsigned char copyrightMessageLength[1];
80 /* There is a variable length field here called 'copyrightMessage'
81 that is the length specified by copyrightMessageLength. */
83 } NlmNAME(External_Copyright_Header);
86 typedef struct nlmNAME(external_extended_header)
89 /* The header is recognized by "MeSsAgEs" in the stamp field. */
91 char stamp[8];
93 unsigned char languageID[NLM_TARGET_LONG_SIZE];
95 unsigned char messageFileOffset[NLM_TARGET_LONG_SIZE];
97 unsigned char messageFileLength[NLM_TARGET_LONG_SIZE];
99 unsigned char messageCount[NLM_TARGET_LONG_SIZE];
101 unsigned char helpFileOffset[NLM_TARGET_LONG_SIZE];
103 unsigned char helpFileLength[NLM_TARGET_LONG_SIZE];
105 unsigned char RPCDataOffset[NLM_TARGET_LONG_SIZE];
107 unsigned char RPCDataLength[NLM_TARGET_LONG_SIZE];
109 unsigned char sharedCodeOffset[NLM_TARGET_LONG_SIZE];
111 unsigned char sharedCodeLength[NLM_TARGET_LONG_SIZE];
113 unsigned char sharedDataOffset[NLM_TARGET_LONG_SIZE];
115 unsigned char sharedDataLength[NLM_TARGET_LONG_SIZE];
117 unsigned char sharedRelocationFixupOffset[NLM_TARGET_LONG_SIZE];
119 unsigned char sharedRelocationFixupCount[NLM_TARGET_LONG_SIZE];
121 unsigned char sharedExternalReferenceOffset[NLM_TARGET_LONG_SIZE];
123 unsigned char sharedExternalReferenceCount[NLM_TARGET_LONG_SIZE];
125 unsigned char sharedPublicsOffset[NLM_TARGET_LONG_SIZE];
127 unsigned char sharedPublicsCount[NLM_TARGET_LONG_SIZE];
129 unsigned char sharedDebugRecordOffset[NLM_TARGET_LONG_SIZE];
131 unsigned char sharedDebugRecordCount[NLM_TARGET_LONG_SIZE];
133 unsigned char sharedInitializationOffset[NLM_TARGET_ADDRESS_SIZE];
135 unsigned char SharedExitProcedureOffset[NLM_TARGET_ADDRESS_SIZE];
137 unsigned char productID[NLM_TARGET_LONG_SIZE];
139 unsigned char reserved0[NLM_TARGET_LONG_SIZE];
141 unsigned char reserved1[NLM_TARGET_LONG_SIZE];
143 unsigned char reserved2[NLM_TARGET_LONG_SIZE];
145 unsigned char reserved3[NLM_TARGET_LONG_SIZE];
147 unsigned char reserved4[NLM_TARGET_LONG_SIZE];
149 unsigned char reserved5[NLM_TARGET_LONG_SIZE];
151 } NlmNAME(External_Extended_Header);
154 typedef struct nlmNAME(external_custom_header)
157 /* The header is recognized by "CuStHeAd" in the stamp field. */
158 char stamp[8];
160 /* Length of this header. */
161 unsigned char length[NLM_TARGET_LONG_SIZE];
163 /* Offset to data. */
164 unsigned char dataOffset[NLM_TARGET_LONG_SIZE];
166 /* Length of data. */
167 unsigned char dataLength[NLM_TARGET_LONG_SIZE];
169 /* Stamp for this customer header--we recognize "CyGnUsEx". */
170 char dataStamp[8];
172 } NlmNAME(External_Custom_Header);