Back to index

cell-binutils  2.17cvs20070401
i386-ext.h
Go to the documentation of this file.
00001 /* i386 NLM (NetWare Loadable Module) support for BFD.
00002    Copyright 1993 Free Software Foundation, Inc.
00003 
00004 This file is part of BFD, the Binary File Descriptor library.
00005 
00006 This program is free software; you can redistribute it and/or modify
00007 it under the terms of the GNU General Public License as published by
00008 the Free Software Foundation; either version 2 of the License, or
00009 (at your option) any later version.
00010 
00011 This program is distributed in the hope that it will be useful,
00012 but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 GNU General Public License for more details.
00015 
00016 You should have received a copy of the GNU General Public License
00017 along with this program; if not, write to the Free Software
00018 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00019 
00020 /* The external format of the fixed header.  */
00021 
00022 typedef struct nlm32_i386_external_fixed_header
00023 {
00024 
00025   /* The signature field identifies the file as an NLM.  It must contain
00026      the signature string, which depends upon the NLM target. */
00027 
00028   unsigned char signature[24];
00029 
00030   /* The version of the header.  At this time, the highest version number
00031      is 4. */
00032 
00033   unsigned char version[4];
00034 
00035   /* The name of the module, which must be a DOS name (1-8 characters followed
00036      by a period and a 1-3 character extension).  The first byte is the byte
00037      length of the name and the last byte is a null terminator byte.  This
00038      field is fixed length, and any unused bytes should be null bytes.  The
00039      value is set by the OUTPUT keyword to NLMLINK. */
00040 
00041   unsigned char moduleName[14];
00042 
00043   /* The byte offset of the code image from the start of the file. */
00044 
00045   unsigned char codeImageOffset[4];
00046 
00047   /* The size of the code image, in bytes. */
00048 
00049   unsigned char codeImageSize[4];
00050 
00051   /* The byte offset of the data image from the start of the file. */
00052 
00053   unsigned char dataImageOffset[4];
00054 
00055   /* The size of the data image, in bytes. */
00056 
00057   unsigned char dataImageSize[4];
00058 
00059   /* The size of the uninitialized data region that the loader is to be
00060      allocated at load time.  Uninitialized data follows the initialized
00061      data in the NLM address space. */
00062 
00063   unsigned char uninitializedDataSize[4];
00064 
00065   /* The byte offset of the custom data from the start of the file.  The
00066      custom data is set by the CUSTOM keyword to NLMLINK.  It is possible
00067      for this to be EOF if there is no custom data. */
00068 
00069   unsigned char customDataOffset[4];
00070 
00071   /* The size of the custom data, in bytes. */
00072 
00073   unsigned char customDataSize[4];
00074 
00075   /* The byte offset of the module dependencies from the start of the file.
00076      The module dependencies are determined by the MODULE keyword in
00077      NLMLINK. */
00078 
00079   unsigned char moduleDependencyOffset[4];
00080 
00081   /* The number of module dependencies at the moduleDependencyOffset. */
00082 
00083   unsigned char numberOfModuleDependencies[4];
00084 
00085   /* The byte offset of the relocation fixup data from the start of the file */
00086      
00087   unsigned char relocationFixupOffset[4];
00088 
00089   unsigned char numberOfRelocationFixups[4];
00090 
00091   unsigned char externalReferencesOffset[4];
00092 
00093   unsigned char numberOfExternalReferences[4];
00094 
00095   unsigned char publicsOffset[4];
00096 
00097   unsigned char numberOfPublics[4];
00098 
00099   /* The byte offset of the internal debug info from the start of the file.
00100      It is possible for this to be EOF if there is no debug info. */
00101 
00102   unsigned char debugInfoOffset[4];
00103 
00104   unsigned char numberOfDebugRecords[4];
00105 
00106   unsigned char codeStartOffset[4];
00107 
00108   unsigned char exitProcedureOffset[4];
00109 
00110   unsigned char checkUnloadProcedureOffset[4];
00111 
00112   unsigned char moduleType[4];
00113 
00114   unsigned char flags[4];
00115 
00116 } Nlm32_i386_External_Fixed_Header;