|
From: <hp...@us...> - 2002-05-09 05:35:26
|
Update of /cvsroot/nasm/nasm/output
In directory usw-pr-cvs1:/tmp/cvs-serv18777
Modified Files:
outobj.c
Log Message:
Fix from John Coffman to 16-bit OBJ format output.
Index: outobj.c
===================================================================
RCS file: /cvsroot/nasm/nasm/output/outobj.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- outobj.c 30 Apr 2002 21:09:18 -0000 1.1
+++ outobj.c 9 May 2002 05:35:23 -0000 1.2
@@ -76,7 +76,7 @@
* next operation.
*/
-#define RECORD_MAX 1024-3 /* maximal size of any record except type+reclen */
+#define RECORD_MAX (1024-3) /* maximal size of any record except type+reclen */
#define OBJ_PARMS 3 /* maximum .parm used by any .ori routine */
#define FIX_08_LOW 0x8000 /* location type for various fixup subrecords */
@@ -133,7 +133,7 @@
ObjRecord **up; /* Master pointer to this ObjRecord */
ObjRecord *back; /* Previous part of this record */
unsigned long parm[OBJ_PARMS]; /* Parameters for ori routine */
- unsigned char buf[RECORD_MAX];
+ unsigned char buf[RECORD_MAX+3];
};
static void obj_fwrite(ObjRecord *orp);
@@ -843,7 +843,19 @@
ext->name = name;
/* Place by default all externs into the current segment */
ext->defwrt_type = DEFWRT_NONE;
+
+/* 28-Apr-2002 - John Coffman
+ The following code was introduced on 12-Aug-2000, and breaks fixups
+ on code passed thru the MSC 5.1 linker (3.66) and MSC 6.00A linker
+ (5.10). It was introduced after FIXUP32 was added, and may be needed
+ for 32-bit segments. The following will get 16-bit segments working
+ again, and maybe someone can correct the 'if' condition which is
+ actually needed.
+*/
+#if 0
if (current_seg) {
+#else
+ if (current_seg && current_seg->use32) {
if (current_seg->grp) {
ext->defwrt_type = DEFWRT_GROUP;
ext->defwrt_ptr.grp = current_seg->grp;
@@ -852,6 +864,8 @@
ext->defwrt_ptr.seg = current_seg;
}
}
+#endif
+
if (is_global == 2) {
ext->commonsize = offset;
ext->commonelem = 1; /* default FAR */
|