Back to index

cell-binutils  2.17cvs20070401
sparc32-ext.h
Go to the documentation of this file.
00001 /* SPARC 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_sparc_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   /* Padding to make it come out correct. */
00044 
00045   unsigned char pad1[2];
00046 
00047   /* The byte offset of the code image from the start of the file. */
00048 
00049   unsigned char codeImageOffset[4];
00050 
00051   /* The size of the code image, in bytes. */
00052 
00053   unsigned char codeImageSize[4];
00054 
00055   /* The byte offset of the data image from the start of the file. */
00056 
00057   unsigned char dataImageOffset[4];
00058 
00059   /* The size of the data image, in bytes. */
00060 
00061   unsigned char dataImageSize[4];
00062 
00063   /* The size of the uninitialized data region that the loader is to be
00064      allocated at load time.  Uninitialized data follows the initialized
00065      data in the NLM address space. */
00066 
00067   unsigned char uninitializedDataSize[4];
00068 
00069   /* The byte offset of the custom data from the start of the file.  The
00070      custom data is set by the CUSTOM keyword to NLMLINK.  It is possible
00071      for this to be EOF if there is no custom data. */
00072 
00073   unsigned char customDataOffset[4];
00074 
00075   /* The size of the custom data, in bytes. */
00076 
00077   unsigned char customDataSize[4];
00078 
00079   /* The byte offset of the module dependencies from the start of the file.
00080      The module dependencies are determined by the MODULE keyword in
00081      NLMLINK. */
00082 
00083   unsigned char moduleDependencyOffset[4];
00084 
00085   /* The number of module dependencies at the moduleDependencyOffset. */
00086 
00087   unsigned char numberOfModuleDependencies[4];
00088 
00089   /* The byte offset of the relocation fixup data from the start of the file */
00090      
00091   unsigned char relocationFixupOffset[4];
00092 
00093   unsigned char numberOfRelocationFixups[4];
00094 
00095   unsigned char externalReferencesOffset[4];
00096 
00097   unsigned char numberOfExternalReferences[4];
00098 
00099   unsigned char publicsOffset[4];
00100 
00101   unsigned char numberOfPublics[4];
00102 
00103   /* The byte offset of the internal debug info from the start of the file.
00104      It is possible for this to be EOF if there is no debug info. */
00105 
00106   unsigned char debugInfoOffset[4];
00107 
00108   unsigned char numberOfDebugRecords[4];
00109 
00110   unsigned char codeStartOffset[4];
00111 
00112   unsigned char exitProcedureOffset[4];
00113 
00114   unsigned char checkUnloadProcedureOffset[4];
00115 
00116   unsigned char moduleType[4];
00117 
00118   unsigned char flags[4];
00119 
00120 } Nlm32_sparc_External_Fixed_Header;