/* NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 2003, 2005 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 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
#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
+ from the external format. This is how we store a custom header
+ which we do not recognize. */
+
typedef struct nlm_internal_custom_header
{
/* The header is recognized by "CuStHeAd" in the stamp field. */
char stamp[8];
+ bfd_size_type hdrLength;
+ file_ptr dataOffset;
bfd_size_type dataLength;
- PTR data;
+ char dataStamp[8];
+ void *hdr;
} 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
-typedef struct nlm_internal_cygnus_section_header
+/* The internal Cygnus header is written out externally as a custom
+ header. We don't try to replicate that structure here. */
+
+typedef struct nlm_internal_cygnus_ext_header
{
- /* The header is recognized by "CyGnUsSeCs" in the stamp field. */
- char stamp[10];
+ /* The header is recognized by "CyGnUsEx" in the stamp field. */
+ char stamp[8];
/* File location of debugging information. */
file_ptr offset;
/* Length of debugging information. */
bfd_size_type length;
-} Nlm_Internal_Cygnus_Section_Header;
+} Nlm_Internal_Cygnus_Ext_Header;
-#define nlm32_internal_cygnus_section_header nlm_internal_cygnus_section_header
-#define Nlm32_Internal_Cygnus_Section_Header Nlm_Internal_Cygnus_Section_Header
-#define nlm64_internal_cygnus_section_header nlm_internal_cygnus_section_header
-#define Nlm64_Internal_Cygnus_Section_Header Nlm_Internal_Cygnus_Section_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