xref: /openbsd-src/gnu/usr.bin/binutils/include/nlm/i386-ext.h (revision 5f210c2af8ad7a823d98e333e3a6e3d7999783f5)
12159047fSniklas /* i386 NLM (NetWare Loadable Module) support for BFD.
2*5f210c2aSfgsch    Copyright 1993 Free Software Foundation, Inc.
32159047fSniklas 
42159047fSniklas This file is part of BFD, the Binary File Descriptor library.
52159047fSniklas 
62159047fSniklas This program is free software; you can redistribute it and/or modify
72159047fSniklas it under the terms of the GNU General Public License as published by
82159047fSniklas the Free Software Foundation; either version 2 of the License, or
92159047fSniklas (at your option) any later version.
102159047fSniklas 
112159047fSniklas This program is distributed in the hope that it will be useful,
122159047fSniklas but WITHOUT ANY WARRANTY; without even the implied warranty of
132159047fSniklas MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
142159047fSniklas GNU General Public License for more details.
152159047fSniklas 
162159047fSniklas You should have received a copy of the GNU General Public License
172159047fSniklas along with this program; if not, write to the Free Software
182159047fSniklas Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
192159047fSniklas 
202159047fSniklas /* The external format of the fixed header.  */
212159047fSniklas 
222159047fSniklas typedef struct nlm32_i386_external_fixed_header
232159047fSniklas {
242159047fSniklas 
252159047fSniklas   /* The signature field identifies the file as an NLM.  It must contain
262159047fSniklas      the signature string, which depends upon the NLM target. */
272159047fSniklas 
282159047fSniklas   unsigned char signature[24];
292159047fSniklas 
302159047fSniklas   /* The version of the header.  At this time, the highest version number
312159047fSniklas      is 4. */
322159047fSniklas 
332159047fSniklas   unsigned char version[4];
342159047fSniklas 
352159047fSniklas   /* The name of the module, which must be a DOS name (1-8 characters followed
362159047fSniklas      by a period and a 1-3 character extension).  The first byte is the byte
372159047fSniklas      length of the name and the last byte is a null terminator byte.  This
382159047fSniklas      field is fixed length, and any unused bytes should be null bytes.  The
392159047fSniklas      value is set by the OUTPUT keyword to NLMLINK. */
402159047fSniklas 
412159047fSniklas   unsigned char moduleName[14];
422159047fSniklas 
432159047fSniklas   /* The byte offset of the code image from the start of the file. */
442159047fSniklas 
452159047fSniklas   unsigned char codeImageOffset[4];
462159047fSniklas 
472159047fSniklas   /* The size of the code image, in bytes. */
482159047fSniklas 
492159047fSniklas   unsigned char codeImageSize[4];
502159047fSniklas 
512159047fSniklas   /* The byte offset of the data image from the start of the file. */
522159047fSniklas 
532159047fSniklas   unsigned char dataImageOffset[4];
542159047fSniklas 
552159047fSniklas   /* The size of the data image, in bytes. */
562159047fSniklas 
572159047fSniklas   unsigned char dataImageSize[4];
582159047fSniklas 
592159047fSniklas   /* The size of the uninitialized data region that the loader is to be
602159047fSniklas      allocated at load time.  Uninitialized data follows the initialized
612159047fSniklas      data in the NLM address space. */
622159047fSniklas 
632159047fSniklas   unsigned char uninitializedDataSize[4];
642159047fSniklas 
652159047fSniklas   /* The byte offset of the custom data from the start of the file.  The
662159047fSniklas      custom data is set by the CUSTOM keyword to NLMLINK.  It is possible
672159047fSniklas      for this to be EOF if there is no custom data. */
682159047fSniklas 
692159047fSniklas   unsigned char customDataOffset[4];
702159047fSniklas 
712159047fSniklas   /* The size of the custom data, in bytes. */
722159047fSniklas 
732159047fSniklas   unsigned char customDataSize[4];
742159047fSniklas 
752159047fSniklas   /* The byte offset of the module dependencies from the start of the file.
762159047fSniklas      The module dependencies are determined by the MODULE keyword in
772159047fSniklas      NLMLINK. */
782159047fSniklas 
792159047fSniklas   unsigned char moduleDependencyOffset[4];
802159047fSniklas 
812159047fSniklas   /* The number of module dependencies at the moduleDependencyOffset. */
822159047fSniklas 
832159047fSniklas   unsigned char numberOfModuleDependencies[4];
842159047fSniklas 
852159047fSniklas   /* The byte offset of the relocation fixup data from the start of the file */
862159047fSniklas 
872159047fSniklas   unsigned char relocationFixupOffset[4];
882159047fSniklas 
892159047fSniklas   unsigned char numberOfRelocationFixups[4];
902159047fSniklas 
912159047fSniklas   unsigned char externalReferencesOffset[4];
922159047fSniklas 
932159047fSniklas   unsigned char numberOfExternalReferences[4];
942159047fSniklas 
952159047fSniklas   unsigned char publicsOffset[4];
962159047fSniklas 
972159047fSniklas   unsigned char numberOfPublics[4];
982159047fSniklas 
992159047fSniklas   /* The byte offset of the internal debug info from the start of the file.
1002159047fSniklas      It is possible for this to be EOF if there is no debug info. */
1012159047fSniklas 
1022159047fSniklas   unsigned char debugInfoOffset[4];
1032159047fSniklas 
1042159047fSniklas   unsigned char numberOfDebugRecords[4];
1052159047fSniklas 
1062159047fSniklas   unsigned char codeStartOffset[4];
1072159047fSniklas 
1082159047fSniklas   unsigned char exitProcedureOffset[4];
1092159047fSniklas 
1102159047fSniklas   unsigned char checkUnloadProcedureOffset[4];
1112159047fSniklas 
1122159047fSniklas   unsigned char moduleType[4];
1132159047fSniklas 
1142159047fSniklas   unsigned char flags[4];
1152159047fSniklas 
1162159047fSniklas } Nlm32_i386_External_Fixed_Header;
117