* elf32-m32c.c (m32c_offset_for_reloc): Fix local symbol
[binutils.git] / include / nlm / external.h
blob66003b302c43b6256ebf9afff6b973bd328ef81f
1 /* NLM (NetWare Loadable Module) support for BFD.
2 Copyright 1993, 1994 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 2 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, 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.
47 /* NLM Header */
49 /* The version header is one of the optional auxiliary headers and
50 follows the fixed length and variable length NLM headers. */
52 typedef struct nlmNAME(external_version_header)
55 /* The header is recognized by "VeRsIoN#" in the stamp field. */
56 char stamp[8];
58 unsigned char majorVersion[NLM_TARGET_LONG_SIZE];
60 unsigned char minorVersion[NLM_TARGET_LONG_SIZE];
62 unsigned char revision[NLM_TARGET_LONG_SIZE];
64 unsigned char year[NLM_TARGET_LONG_SIZE];
66 unsigned char month[NLM_TARGET_LONG_SIZE];
68 unsigned char day[NLM_TARGET_LONG_SIZE];
70 } NlmNAME(External_Version_Header);
73 typedef struct nlmNAME(external_copyright_header)
76 /* The header is recognized by "CoPyRiGhT=" in the stamp field. */
78 char stamp[10];
80 unsigned char copyrightMessageLength[1];
82 /* There is a variable length field here called 'copyrightMessage'
83 that is the length specified by copyrightMessageLength. */
85 } NlmNAME(External_Copyright_Header);
88 typedef struct nlmNAME(external_extended_header)
91 /* The header is recognized by "MeSsAgEs" in the stamp field. */
93 char stamp[8];
95 unsigned char languageID[NLM_TARGET_LONG_SIZE];
97 unsigned char messageFileOffset[NLM_TARGET_LONG_SIZE];
99 unsigned char messageFileLength[NLM_TARGET_LONG_SIZE];
101 unsigned char messageCount[NLM_TARGET_LONG_SIZE];
103 unsigned char helpFileOffset[NLM_TARGET_LONG_SIZE];
105 unsigned char helpFileLength[NLM_TARGET_LONG_SIZE];
107 unsigned char RPCDataOffset[NLM_TARGET_LONG_SIZE];
109 unsigned char RPCDataLength[NLM_TARGET_LONG_SIZE];
111 unsigned char sharedCodeOffset[NLM_TARGET_LONG_SIZE];
113 unsigned char sharedCodeLength[NLM_TARGET_LONG_SIZE];
115 unsigned char sharedDataOffset[NLM_TARGET_LONG_SIZE];
117 unsigned char sharedDataLength[NLM_TARGET_LONG_SIZE];
119 unsigned char sharedRelocationFixupOffset[NLM_TARGET_LONG_SIZE];
121 unsigned char sharedRelocationFixupCount[NLM_TARGET_LONG_SIZE];
123 unsigned char sharedExternalReferenceOffset[NLM_TARGET_LONG_SIZE];
125 unsigned char sharedExternalReferenceCount[NLM_TARGET_LONG_SIZE];
127 unsigned char sharedPublicsOffset[NLM_TARGET_LONG_SIZE];
129 unsigned char sharedPublicsCount[NLM_TARGET_LONG_SIZE];
131 unsigned char sharedDebugRecordOffset[NLM_TARGET_LONG_SIZE];
133 unsigned char sharedDebugRecordCount[NLM_TARGET_LONG_SIZE];
135 unsigned char sharedInitializationOffset[NLM_TARGET_ADDRESS_SIZE];
137 unsigned char SharedExitProcedureOffset[NLM_TARGET_ADDRESS_SIZE];
139 unsigned char productID[NLM_TARGET_LONG_SIZE];
141 unsigned char reserved0[NLM_TARGET_LONG_SIZE];
143 unsigned char reserved1[NLM_TARGET_LONG_SIZE];
145 unsigned char reserved2[NLM_TARGET_LONG_SIZE];
147 unsigned char reserved3[NLM_TARGET_LONG_SIZE];
149 unsigned char reserved4[NLM_TARGET_LONG_SIZE];
151 unsigned char reserved5[NLM_TARGET_LONG_SIZE];
153 } NlmNAME(External_Extended_Header);
156 typedef struct nlmNAME(external_custom_header)
159 /* The header is recognized by "CuStHeAd" in the stamp field. */
160 char stamp[8];
162 /* Length of this header. */
163 unsigned char length[NLM_TARGET_LONG_SIZE];
165 /* Offset to data. */
166 unsigned char dataOffset[NLM_TARGET_LONG_SIZE];
168 /* Length of data. */
169 unsigned char dataLength[NLM_TARGET_LONG_SIZE];
171 /* Stamp for this customer header--we recognize "CyGnUsEx". */
172 char dataStamp[8];
174 } NlmNAME(External_Custom_Header);