aboutsummaryrefslogtreecommitdiff
path: root/include/nlm
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-04-20 18:30:29 +0000
committerIan Lance Taylor <ian@airs.com>1994-04-20 18:30:29 +0000
commitefb7100d55a456f5a0ca7a26108148897b1b78c4 (patch)
tree2b80fb70a3071298f48b625f1f3e777e2747a64a /include/nlm
parent50cca378931f2623f4df0e1f4b8c61321185efde (diff)
downloadgdb-efb7100d55a456f5a0ca7a26108148897b1b78c4.zip
gdb-efb7100d55a456f5a0ca7a26108148897b1b78c4.tar.gz
gdb-efb7100d55a456f5a0ca7a26108148897b1b78c4.tar.bz2
* internal.h (struct nlm_internal_custom_header): Remove
debugRecOffset and debugRecLength fields. Add data field. * external.h (struct nlmNAME(external_custom_header)): Remove debugRecOffset and debugRecLength fields.
Diffstat (limited to 'include/nlm')
-rw-r--r--include/nlm/external.h108
-rw-r--r--include/nlm/internal.h15
2 files changed, 16 insertions, 107 deletions
diff --git a/include/nlm/external.h b/include/nlm/external.h
index 83592d0..70262ed 100644
--- a/include/nlm/external.h
+++ b/include/nlm/external.h
@@ -38,106 +38,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
order. There is no way to identify the end of the auxiliary headers
except by finding a header without a recognized 'stamp'.
+ The exact format of the fixed length header unfortunately varies
+ from one NLM target to another, due to padding. Each target
+ defines the correct external format in a separate header file.
+
*/
/* NLM Header */
-typedef struct nlmNAME(external_fixed_header)
-{
-
- /* The signature field identifies the file as an NLM. It must contain
- the signature string, which depends upon the NLM target. */
-
- unsigned char signature[NLM_SIGNATURE_SIZE];
-
- /* The version of the header. At this time, the highest version number
- is 4. */
-
- unsigned char version[NLM_TARGET_LONG_SIZE];
-
- /* 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
- 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
- value is set by the OUTPUT keyword to NLMLINK. */
-
- unsigned char moduleName[NLM_MODULE_NAME_SIZE];
-
- /* The byte offset of the code image from the start of the file. */
-
- unsigned char codeImageOffset[NLM_TARGET_LONG_SIZE];
-
- /* The size of the code image, in bytes. */
-
- unsigned char codeImageSize[NLM_TARGET_LONG_SIZE];
-
- /* The byte offset of the data image from the start of the file. */
-
- unsigned char dataImageOffset[NLM_TARGET_LONG_SIZE];
-
- /* The size of the data image, in bytes. */
-
- unsigned char dataImageSize[NLM_TARGET_LONG_SIZE];
-
- /* The size of the uninitialized data region that the loader is to be
- allocated at load time. Uninitialized data follows the initialized
- data in the NLM address space. */
-
- unsigned char uninitializedDataSize[NLM_TARGET_LONG_SIZE];
-
- /* The byte offset of the custom data from the start of the file. The
- custom data is set by the CUSTOM keyword to NLMLINK. It is possible
- for this to be EOF if there is no custom data. */
-
- unsigned char customDataOffset[NLM_TARGET_LONG_SIZE];
-
- /* The size of the custom data, in bytes. */
-
- unsigned char customDataSize[NLM_TARGET_LONG_SIZE];
-
- /* The byte offset of the module dependencies from the start of the file.
- The module dependencies are determined by the MODULE keyword in
- NLMLINK. */
-
- unsigned char moduleDependencyOffset[NLM_TARGET_LONG_SIZE];
-
- /* The number of module dependencies at the moduleDependencyOffset. */
-
- unsigned char numberOfModuleDependencies[NLM_TARGET_LONG_SIZE];
-
- /* The byte offset of the relocation fixup data from the start of the file */
-
- unsigned char relocationFixupOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char numberOfRelocationFixups[NLM_TARGET_LONG_SIZE];
-
- unsigned char externalReferencesOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char numberOfExternalReferences[NLM_TARGET_LONG_SIZE];
-
- unsigned char publicsOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char numberOfPublics[NLM_TARGET_LONG_SIZE];
-
- /* The byte offset of the internal debug info from the start of the file.
- It is possible for this to be EOF if there is no debug info. */
-
- unsigned char debugInfoOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char numberOfDebugRecords[NLM_TARGET_LONG_SIZE];
-
- unsigned char codeStartOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char exitProcedureOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char checkUnloadProcedureOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char moduleType[NLM_TARGET_LONG_SIZE];
-
- unsigned char flags[NLM_TARGET_LONG_SIZE];
-
-} NlmNAME(External_Fixed_Header);
-
/* The version header is one of the optional auxiliary headers and
follows the fixed length and variable length NLM headers. */
@@ -220,6 +128,10 @@ typedef struct nlmNAME(external_extended_header)
unsigned char sharedPublicsCount[NLM_TARGET_LONG_SIZE];
+ unsigned char sharedDebugRecordOffset[NLM_TARGET_LONG_SIZE];
+
+ unsigned char sharedDebugRecordCount[NLM_TARGET_LONG_SIZE];
+
unsigned char sharedInitializationOffset[NLM_TARGET_ADDRESS_SIZE];
unsigned char SharedExitProcedureOffset[NLM_TARGET_ADDRESS_SIZE];
@@ -249,8 +161,4 @@ typedef struct nlmNAME(external_custom_header)
unsigned char dataLength[NLM_TARGET_LONG_SIZE];
- unsigned char debugRecOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char debugRecLength[NLM_TARGET_LONG_SIZE];
-
} NlmNAME(External_Custom_Header);
diff --git a/include/nlm/internal.h b/include/nlm/internal.h
index 48c3d7e..3597efb 100644
--- a/include/nlm/internal.h
+++ b/include/nlm/internal.h
@@ -37,11 +37,11 @@ typedef unsigned long Nlm32_Word; /* Unsigned large integer */
typedef unsigned short Nlm32_Half; /* Unsigned medium integer */
typedef unsigned char Nlm32_Char; /* Unsigned tiny integer */
-#ifdef HOST_64_BIT
-typedef unsigned HOST_64_BIT Nlm64_Addr;
-typedef unsigned HOST_64_BIT Nlm64_Off;
-typedef HOST_64_BIT Nlm64_Sxword;
-typedef unsigned HOST_64_BIT Nlm64_Xword;
+#ifdef BFD_HOST_64_BIT
+typedef unsigned BFD_HOST_64_BIT Nlm64_Addr;
+typedef unsigned BFD_HOST_64_BIT Nlm64_Off;
+typedef BFD_HOST_64_BIT Nlm64_Sxword;
+typedef unsigned BFD_HOST_64_BIT Nlm64_Xword;
#endif
typedef long Nlm64_Sword;
typedef unsigned long Nlm64_Word;
@@ -252,6 +252,8 @@ typedef struct nlm_internal_extended_header
long sharedExternalReferenceCount;
file_ptr sharedPublicsOffset;
long sharedPublicsCount;
+ file_ptr sharedDebugRecordOffset;
+ long sharedDebugRecordCount;
bfd_vma SharedInitializationOffset;
bfd_vma SharedExitProcedureOffset;
long productID;
@@ -273,8 +275,7 @@ typedef struct nlm_internal_custom_header
/* The header is recognized by "CuStHeAd" in the stamp field. */
char stamp[8];
bfd_size_type dataLength;
- file_ptr debugRecOffset;
- bfd_size_type debugRecLength;
+ PTR data;
} Nlm_Internal_Custom_Header;
#define nlm32_internal_custom_header nlm_internal_custom_header