OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-6.8/] [include/] [nlm/] [internal.h] - Diff between revs 827 and 840

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 827 Rev 840
/* NLM (NetWare Loadable Module) support for BFD.
/* NLM (NetWare Loadable Module) support for BFD.
   Copyright 1993, 1994, 2003, 2005 Free Software Foundation, Inc.
   Copyright 1993, 1994, 2003, 2005 Free Software Foundation, Inc.
 
 
   Written by Fred Fish @ Cygnus Support.
   Written by Fred Fish @ Cygnus Support.
 
 
This file is part of BFD, the Binary File Descriptor library.
This file is part of BFD, the Binary File Descriptor library.
 
 
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
(at your option) any later version.
 
 
This program is distributed in the hope that it will be useful,
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
GNU General Public License for more details.
 
 
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 
 
 
/* This file is part of NLM support for BFD, and contains the portions
/* This file is part of NLM support for BFD, and contains the portions
   that describe how NLM is represented internally in the BFD library.
   that describe how NLM is represented internally in the BFD library.
   I.E. it describes the in-memory representation of NLM.  It requires
   I.E. it describes the in-memory representation of NLM.  It requires
   the nlm/common.h file which contains the portions that are common to
   the nlm/common.h file which contains the portions that are common to
   both the internal and external representations. */
   both the internal and external representations. */
 
 
#if 0
#if 0
 
 
/* Types used by various structures, functions, etc. */
/* Types used by various structures, functions, etc. */
 
 
typedef unsigned long   Nlm32_Addr;     /* Unsigned program address */
typedef unsigned long   Nlm32_Addr;     /* Unsigned program address */
typedef unsigned long   Nlm32_Off;      /* Unsigned file offset */
typedef unsigned long   Nlm32_Off;      /* Unsigned file offset */
typedef          long   Nlm32_Sword;    /* Signed large integer */
typedef          long   Nlm32_Sword;    /* Signed large integer */
typedef unsigned long   Nlm32_Word;     /* Unsigned large integer */
typedef unsigned long   Nlm32_Word;     /* Unsigned large integer */
typedef unsigned short  Nlm32_Half;     /* Unsigned medium integer */
typedef unsigned short  Nlm32_Half;     /* Unsigned medium integer */
typedef unsigned char   Nlm32_Char;     /* Unsigned tiny integer */
typedef unsigned char   Nlm32_Char;     /* Unsigned tiny integer */
 
 
#ifdef BFD_HOST_64_BIT
#ifdef BFD_HOST_64_BIT
typedef unsigned BFD_HOST_64_BIT        Nlm64_Addr;
typedef unsigned BFD_HOST_64_BIT        Nlm64_Addr;
typedef unsigned BFD_HOST_64_BIT        Nlm64_Off;
typedef unsigned BFD_HOST_64_BIT        Nlm64_Off;
typedef          BFD_HOST_64_BIT        Nlm64_Sxword;
typedef          BFD_HOST_64_BIT        Nlm64_Sxword;
typedef unsigned BFD_HOST_64_BIT        Nlm64_Xword;
typedef unsigned BFD_HOST_64_BIT        Nlm64_Xword;
#endif
#endif
typedef          long           Nlm64_Sword;
typedef          long           Nlm64_Sword;
typedef unsigned long           Nlm64_Word;
typedef unsigned long           Nlm64_Word;
typedef unsigned short          Nlm64_Half;
typedef unsigned short          Nlm64_Half;
 
 
#endif /* 0 */
#endif /* 0 */
 
 
/* This structure contains the internal form of the portion of the NLM
/* This structure contains the internal form of the portion of the NLM
   header that is fixed length. */
   header that is fixed length. */
 
 
typedef struct nlm_internal_fixed_header
typedef struct nlm_internal_fixed_header
{
{
  /* The signature field identifies the file as an NLM.  It must contain
  /* The signature field identifies the file as an NLM.  It must contain
     the signature string, which depends upon the NLM target. */
     the signature string, which depends upon the NLM target. */
 
 
  char signature[NLM_SIGNATURE_SIZE];
  char signature[NLM_SIGNATURE_SIZE];
 
 
  /* The version of the header.  At this time, the highest version number
  /* The version of the header.  At this time, the highest version number
     is 4. */
     is 4. */
 
 
  long version;
  long version;
 
 
  /* The name of the module, which must be a DOS name (1-8 characters followed
  /* The name of the module, which must be a DOS name (1-8 characters followed
     by a period and a 1-3 character extension.  The first byte is the byte
     by a period and a 1-3 character extension.  The first byte is the byte
     length of the name and the last byte is a null terminator byte.  This
     length of the name and the last byte is a null terminator byte.  This
     field is fixed length, and any unused bytes should be null bytes.  The
     field is fixed length, and any unused bytes should be null bytes.  The
     value is set by the OUTPUT keyword to NLMLINK. */
     value is set by the OUTPUT keyword to NLMLINK. */
 
 
  char moduleName[NLM_MODULE_NAME_SIZE];
  char moduleName[NLM_MODULE_NAME_SIZE];
 
 
  /* The byte offset of the code image from the start of the file. */
  /* The byte offset of the code image from the start of the file. */
 
 
  file_ptr codeImageOffset;
  file_ptr codeImageOffset;
 
 
  /* The size of the code image, in bytes. */
  /* The size of the code image, in bytes. */
 
 
  bfd_size_type codeImageSize;
  bfd_size_type codeImageSize;
 
 
  /* The byte offset of the data image from the start of the file. */
  /* The byte offset of the data image from the start of the file. */
 
 
  file_ptr dataImageOffset;
  file_ptr dataImageOffset;
 
 
  /* The size of the data image, in bytes. */
  /* The size of the data image, in bytes. */
 
 
  bfd_size_type dataImageSize;
  bfd_size_type dataImageSize;
 
 
  /* The size of the uninitialized data region that the loader is to be
  /* The size of the uninitialized data region that the loader is to be
     allocated at load time.  Uninitialized data follows the initialized
     allocated at load time.  Uninitialized data follows the initialized
     data in the NLM address space. */
     data in the NLM address space. */
 
 
  bfd_size_type uninitializedDataSize;
  bfd_size_type uninitializedDataSize;
 
 
  /* The byte offset of the custom data from the start of the file.  The
  /* The byte offset of the custom data from the start of the file.  The
     custom data is set by the CUSTOM keyword to NLMLINK. */
     custom data is set by the CUSTOM keyword to NLMLINK. */
 
 
  file_ptr customDataOffset;
  file_ptr customDataOffset;
 
 
  /* The size of the custom data, in bytes. */
  /* The size of the custom data, in bytes. */
 
 
  bfd_size_type customDataSize;
  bfd_size_type customDataSize;
 
 
  /* The byte offset of the module dependencies from the start of the file.
  /* The byte offset of the module dependencies from the start of the file.
     The module dependencies are determined by the MODULE keyword in
     The module dependencies are determined by the MODULE keyword in
     NLMLINK. */
     NLMLINK. */
 
 
  file_ptr moduleDependencyOffset;
  file_ptr moduleDependencyOffset;
 
 
  /* The number of module dependencies at the moduleDependencyOffset. */
  /* The number of module dependencies at the moduleDependencyOffset. */
 
 
  long numberOfModuleDependencies;
  long numberOfModuleDependencies;
 
 
  /* The byte offset of the relocation fixup data from the start of the file */
  /* The byte offset of the relocation fixup data from the start of the file */
 
 
  file_ptr relocationFixupOffset;
  file_ptr relocationFixupOffset;
  long numberOfRelocationFixups;
  long numberOfRelocationFixups;
  file_ptr externalReferencesOffset;
  file_ptr externalReferencesOffset;
  long numberOfExternalReferences;
  long numberOfExternalReferences;
  file_ptr publicsOffset;
  file_ptr publicsOffset;
  long numberOfPublics;
  long numberOfPublics;
  file_ptr debugInfoOffset;
  file_ptr debugInfoOffset;
  long numberOfDebugRecords;
  long numberOfDebugRecords;
  file_ptr codeStartOffset;
  file_ptr codeStartOffset;
  file_ptr exitProcedureOffset;
  file_ptr exitProcedureOffset;
  file_ptr checkUnloadProcedureOffset;
  file_ptr checkUnloadProcedureOffset;
  long moduleType;
  long moduleType;
  long flags;
  long flags;
} Nlm_Internal_Fixed_Header;
} Nlm_Internal_Fixed_Header;
 
 
#define nlm32_internal_fixed_header nlm_internal_fixed_header
#define nlm32_internal_fixed_header nlm_internal_fixed_header
#define Nlm32_Internal_Fixed_Header Nlm_Internal_Fixed_Header
#define Nlm32_Internal_Fixed_Header Nlm_Internal_Fixed_Header
#define nlm64_internal_fixed_header nlm_internal_fixed_header
#define nlm64_internal_fixed_header nlm_internal_fixed_header
#define Nlm64_Internal_Fixed_Header Nlm_Internal_Fixed_Header
#define Nlm64_Internal_Fixed_Header Nlm_Internal_Fixed_Header
 
 
/* This structure contains the portions of the NLM header that are either
/* This structure contains the portions of the NLM header that are either
   variable in size in the external representation, or else are not at a
   variable in size in the external representation, or else are not at a
   fixed offset relative to the start of the NLM header due to preceding
   fixed offset relative to the start of the NLM header due to preceding
   variable sized fields.
   variable sized fields.
 
 
   Note that all the fields must exist in the external header, and in
   Note that all the fields must exist in the external header, and in
   the order used here (the same order is used in the internal form
   the order used here (the same order is used in the internal form
   for consistency, not out of necessity). */
   for consistency, not out of necessity). */
 
 
typedef struct nlm_internal_variable_header
typedef struct nlm_internal_variable_header
{
{
 
 
  /* The descriptionLength field contains the length of the text in
  /* The descriptionLength field contains the length of the text in
     descriptionText, excluding the null terminator.  The descriptionText
     descriptionText, excluding the null terminator.  The descriptionText
     field contains the NLM description obtained from the DESCRIPTION
     field contains the NLM description obtained from the DESCRIPTION
     keyword in NLMLINK plus the null byte terminator.  The descriptionText
     keyword in NLMLINK plus the null byte terminator.  The descriptionText
     can be up to NLM_MAX_DESCRIPTION_LENGTH characters. */
     can be up to NLM_MAX_DESCRIPTION_LENGTH characters. */
 
 
  unsigned char descriptionLength;
  unsigned char descriptionLength;
  char descriptionText[NLM_MAX_DESCRIPTION_LENGTH + 1];
  char descriptionText[NLM_MAX_DESCRIPTION_LENGTH + 1];
 
 
  /* The stackSize field contains the size of the stack in bytes, as
  /* The stackSize field contains the size of the stack in bytes, as
     specified by the STACK or STACKSIZE keyword in NLMLINK.  If no size
     specified by the STACK or STACKSIZE keyword in NLMLINK.  If no size
     is specified, the default is NLM_DEFAULT_STACKSIZE. */
     is specified, the default is NLM_DEFAULT_STACKSIZE. */
 
 
  long stackSize;
  long stackSize;
 
 
  /* The reserved field is included only for completeness.  It should contain
  /* The reserved field is included only for completeness.  It should contain
     zero. */
     zero. */
 
 
  long reserved;
  long reserved;
 
 
  /* This field is fixed length, should contain " LONG" (note leading
  /* This field is fixed length, should contain " LONG" (note leading
     space), and is unused. */
     space), and is unused. */
 
 
  char oldThreadName[NLM_OLD_THREAD_NAME_LENGTH];
  char oldThreadName[NLM_OLD_THREAD_NAME_LENGTH];
 
 
  /* The screenNameLength field contains the length of the actual text stored
  /* The screenNameLength field contains the length of the actual text stored
     in the screenName field, excluding the null byte terminator.  The
     in the screenName field, excluding the null byte terminator.  The
     screenName field contains the screen name as specified by the SCREENNAME
     screenName field contains the screen name as specified by the SCREENNAME
     keyword in NLMLINK, and can be up to NLM_MAX_SCREEN_NAME_LENGTH
     keyword in NLMLINK, and can be up to NLM_MAX_SCREEN_NAME_LENGTH
     characters. */
     characters. */
 
 
  unsigned char screenNameLength;
  unsigned char screenNameLength;
  char screenName[NLM_MAX_SCREEN_NAME_LENGTH + 1];
  char screenName[NLM_MAX_SCREEN_NAME_LENGTH + 1];
 
 
  /* The threadNameLength field contains the length of the actual text stored
  /* The threadNameLength field contains the length of the actual text stored
     in the threadName field, excluding the null byte terminator.  The
     in the threadName field, excluding the null byte terminator.  The
     threadName field contains the thread name as specified by the THREADNAME
     threadName field contains the thread name as specified by the THREADNAME
     keyword in NLMLINK, and can be up to NLM_MAX_THREAD_NAME_LENGTH
     keyword in NLMLINK, and can be up to NLM_MAX_THREAD_NAME_LENGTH
     characters. */
     characters. */
 
 
  unsigned char threadNameLength;
  unsigned char threadNameLength;
  char threadName[NLM_MAX_THREAD_NAME_LENGTH + 1];
  char threadName[NLM_MAX_THREAD_NAME_LENGTH + 1];
 
 
} Nlm_Internal_Variable_Header;
} Nlm_Internal_Variable_Header;
 
 
#define nlm32_internal_variable_header nlm_internal_variable_header
#define nlm32_internal_variable_header nlm_internal_variable_header
#define Nlm32_Internal_Variable_Header Nlm_Internal_Variable_Header
#define Nlm32_Internal_Variable_Header Nlm_Internal_Variable_Header
#define nlm64_internal_variable_header nlm_internal_variable_header
#define nlm64_internal_variable_header nlm_internal_variable_header
#define Nlm64_Internal_Variable_Header Nlm_Internal_Variable_Header
#define Nlm64_Internal_Variable_Header Nlm_Internal_Variable_Header
 
 
/* The version header is one of the optional auxiliary headers and
/* The version header is one of the optional auxiliary headers and
   follows the fixed length and variable length NLM headers. */
   follows the fixed length and variable length NLM headers. */
 
 
typedef struct nlm_internal_version_header
typedef struct nlm_internal_version_header
{
{
  /* The header is recognized by "VeRsIoN#" in the stamp field. */
  /* The header is recognized by "VeRsIoN#" in the stamp field. */
  char stamp[8];
  char stamp[8];
  long majorVersion;
  long majorVersion;
  long minorVersion;
  long minorVersion;
  long revision;
  long revision;
  long year;
  long year;
  long month;
  long month;
  long day;
  long day;
} Nlm_Internal_Version_Header;
} Nlm_Internal_Version_Header;
 
 
#define nlm32_internal_version_header nlm_internal_version_header
#define nlm32_internal_version_header nlm_internal_version_header
#define Nlm32_Internal_Version_Header Nlm_Internal_Version_Header
#define Nlm32_Internal_Version_Header Nlm_Internal_Version_Header
#define nlm64_internal_version_header nlm_internal_version_header
#define nlm64_internal_version_header nlm_internal_version_header
#define Nlm64_Internal_Version_Header Nlm_Internal_Version_Header
#define Nlm64_Internal_Version_Header Nlm_Internal_Version_Header
 
 
typedef struct nlm_internal_copyright_header
typedef struct nlm_internal_copyright_header
{
{
  /* The header is recognized by "CoPyRiGhT=" in the stamp field. */
  /* The header is recognized by "CoPyRiGhT=" in the stamp field. */
  char stamp[10];
  char stamp[10];
  unsigned char copyrightMessageLength;
  unsigned char copyrightMessageLength;
  char copyrightMessage[NLM_MAX_COPYRIGHT_MESSAGE_LENGTH];
  char copyrightMessage[NLM_MAX_COPYRIGHT_MESSAGE_LENGTH];
} Nlm_Internal_Copyright_Header;
} Nlm_Internal_Copyright_Header;
 
 
#define nlm32_internal_copyright_header nlm_internal_copyright_header
#define nlm32_internal_copyright_header nlm_internal_copyright_header
#define Nlm32_Internal_Copyright_Header Nlm_Internal_Copyright_Header
#define Nlm32_Internal_Copyright_Header Nlm_Internal_Copyright_Header
#define nlm64_internal_copyright_header nlm_internal_copyright_header
#define nlm64_internal_copyright_header nlm_internal_copyright_header
#define Nlm64_Internal_Copyright_Header Nlm_Internal_Copyright_Header
#define Nlm64_Internal_Copyright_Header Nlm_Internal_Copyright_Header
 
 
typedef struct nlm_internal_extended_header
typedef struct nlm_internal_extended_header
{
{
  /* The header is recognized by "MeSsAgEs" in the stamp field. */
  /* The header is recognized by "MeSsAgEs" in the stamp field. */
  char stamp[8];
  char stamp[8];
  long languageID;
  long languageID;
  file_ptr messageFileOffset;
  file_ptr messageFileOffset;
  bfd_size_type messageFileLength;
  bfd_size_type messageFileLength;
  long messageCount;
  long messageCount;
  file_ptr helpFileOffset;
  file_ptr helpFileOffset;
  bfd_size_type helpFileLength;
  bfd_size_type helpFileLength;
  file_ptr RPCDataOffset;
  file_ptr RPCDataOffset;
  bfd_size_type RPCDataLength;
  bfd_size_type RPCDataLength;
  file_ptr sharedCodeOffset;
  file_ptr sharedCodeOffset;
  bfd_size_type sharedCodeLength;
  bfd_size_type sharedCodeLength;
  file_ptr sharedDataOffset;
  file_ptr sharedDataOffset;
  bfd_size_type sharedDataLength;
  bfd_size_type sharedDataLength;
  file_ptr sharedRelocationFixupOffset;
  file_ptr sharedRelocationFixupOffset;
  long sharedRelocationFixupCount;
  long sharedRelocationFixupCount;
  file_ptr sharedExternalReferenceOffset;
  file_ptr sharedExternalReferenceOffset;
  long sharedExternalReferenceCount;
  long sharedExternalReferenceCount;
  file_ptr sharedPublicsOffset;
  file_ptr sharedPublicsOffset;
  long sharedPublicsCount;
  long sharedPublicsCount;
  file_ptr sharedDebugRecordOffset;
  file_ptr sharedDebugRecordOffset;
  long sharedDebugRecordCount;
  long sharedDebugRecordCount;
  bfd_vma SharedInitializationOffset;
  bfd_vma SharedInitializationOffset;
  bfd_vma SharedExitProcedureOffset;
  bfd_vma SharedExitProcedureOffset;
  long productID;
  long productID;
  long reserved0;
  long reserved0;
  long reserved1;
  long reserved1;
  long reserved2;
  long reserved2;
  long reserved3;
  long reserved3;
  long reserved4;
  long reserved4;
  long reserved5;
  long reserved5;
} Nlm_Internal_Extended_Header;
} Nlm_Internal_Extended_Header;
 
 
#define nlm32_internal_extended_header nlm_internal_extended_header
#define nlm32_internal_extended_header nlm_internal_extended_header
#define Nlm32_Internal_Extended_Header Nlm_Internal_Extended_Header
#define Nlm32_Internal_Extended_Header Nlm_Internal_Extended_Header
#define nlm64_internal_extended_header nlm_internal_extended_header
#define nlm64_internal_extended_header nlm_internal_extended_header
#define Nlm64_Internal_Extended_Header Nlm_Internal_Extended_Header
#define Nlm64_Internal_Extended_Header Nlm_Internal_Extended_Header
 
 
/* The format of a custom header as stored internally is different
/* The format of a custom header as stored internally is different
   from the external format.  This is how we store a custom header
   from the external format.  This is how we store a custom header
   which we do not recognize.  */
   which we do not recognize.  */
 
 
typedef struct nlm_internal_custom_header
typedef struct nlm_internal_custom_header
{
{
  /* The header is recognized by "CuStHeAd" in the stamp field. */
  /* The header is recognized by "CuStHeAd" in the stamp field. */
  char stamp[8];
  char stamp[8];
  bfd_size_type hdrLength;
  bfd_size_type hdrLength;
  file_ptr dataOffset;
  file_ptr dataOffset;
  bfd_size_type dataLength;
  bfd_size_type dataLength;
  char dataStamp[8];
  char dataStamp[8];
  void *hdr;
  void *hdr;
} Nlm_Internal_Custom_Header;
} Nlm_Internal_Custom_Header;
 
 
#define nlm32_internal_custom_header nlm_internal_custom_header
#define nlm32_internal_custom_header nlm_internal_custom_header
#define Nlm32_Internal_Custom_Header Nlm_Internal_Custom_Header
#define Nlm32_Internal_Custom_Header Nlm_Internal_Custom_Header
#define nlm64_internal_custom_header nlm_internal_custom_header
#define nlm64_internal_custom_header nlm_internal_custom_header
#define Nlm64_Internal_Custom_Header Nlm_Internal_Custom_Header
#define Nlm64_Internal_Custom_Header Nlm_Internal_Custom_Header
 
 
/* The internal Cygnus header is written out externally as a custom
/* The internal Cygnus header is written out externally as a custom
   header.  We don't try to replicate that structure here.  */
   header.  We don't try to replicate that structure here.  */
 
 
typedef struct nlm_internal_cygnus_ext_header
typedef struct nlm_internal_cygnus_ext_header
{
{
  /* The header is recognized by "CyGnUsEx" in the stamp field. */
  /* The header is recognized by "CyGnUsEx" in the stamp field. */
  char stamp[8];
  char stamp[8];
  /* File location of debugging information.  */
  /* File location of debugging information.  */
  file_ptr offset;
  file_ptr offset;
  /* Length of debugging information.  */
  /* Length of debugging information.  */
  bfd_size_type length;
  bfd_size_type length;
} Nlm_Internal_Cygnus_Ext_Header;
} Nlm_Internal_Cygnus_Ext_Header;
 
 
#define nlm32_internal_cygnus_ext_header nlm_internal_cygnus_ext_header
#define nlm32_internal_cygnus_ext_header nlm_internal_cygnus_ext_header
#define Nlm32_Internal_Cygnus_Ext_Header Nlm_Internal_Cygnus_Ext_Header
#define Nlm32_Internal_Cygnus_Ext_Header Nlm_Internal_Cygnus_Ext_Header
#define nlm64_internal_cygnus_ext_header nlm_internal_cygnus_ext_header
#define nlm64_internal_cygnus_ext_header nlm_internal_cygnus_ext_header
#define Nlm64_Internal_Cygnus_Ext_Header Nlm_Internal_Cygnus_Ext_Header
#define Nlm64_Internal_Cygnus_Ext_Header Nlm_Internal_Cygnus_Ext_Header
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.