diff -ur orig/nasm-0.98.08/nasm.c nasm-0.98.08/nasm.c
--- orig/nasm-0.98.08/nasm.c	Mon Mar  5 04:07:28 2001
+++ nasm-0.98.08/nasm.c	Mon Apr  2 16:15:56 2001
@@ -81,7 +81,7 @@
  * doesn't do anything. Initial defaults are given here.
  */
 static char suppressed[1+ERR_WARN_MAX] = {
-    0, TRUE, TRUE, TRUE, FALSE
+  0, TRUE, TRUE, TRUE, FALSE, TRUE
 };
 
 /*
@@ -90,6 +90,7 @@
  */
 static char *suppressed_names[1+ERR_WARN_MAX] = {
     NULL, "macro-params", "macro-selfref", "orphan-labels", "number-overflow",
+    "gnu-elf-extensions"
 };
 
 /*
@@ -101,7 +102,8 @@
     "macro calls with wrong no. of params",
     "cyclic macro self-references",
     "labels alone on lines without trailing `:'",
-    "numeric constants greater than 0xFFFFFFFF"
+    "numeric constants greater than 0xFFFFFFFF",
+    "using 8- or 16-bit relocation in ELF, a GNU extension"
 };
 
 /*
@@ -445,7 +447,7 @@
 		   "    -w+foo      enables warnings about foo; -w-foo disables them\n"
 		   "where foo can be:\n");
 	    for (i=1; i<=ERR_WARN_MAX; i++)
-		printf("    %-16s%s (default %s)\n",
+		printf("    %-23s %s (default %s)\n",
 		       suppressed_names[i], suppressed_what[i],
 		       suppressed[i] ? "off" : "on");
 	    printf ("\nresponse files should contain command line parameters"
Only in nasm-0.98.08: nasm.c.orig
Only in nasm-0.98.08: nasm.c.rej
diff -ur orig/nasm-0.98.08/nasm.h nasm-0.98.08/nasm.h
--- orig/nasm-0.98.08/nasm.h	Mon Mar  5 05:07:44 2001
+++ nasm-0.98.08/nasm.h	Mon Apr  2 16:12:58 2001
@@ -97,7 +97,8 @@
 #define ERR_WARN_OL	0x00000300	/* orphan label (no colon, and
 					* alone on line) */
 #define ERR_WARN_NOV	0x00000400	/* numeric overflow */
-#define ERR_WARN_MAX	4		/* the highest numbered one */
+#define ERR_WARN_GNUELF	0x00000500      /* using GNU ELF extensions */
+#define ERR_WARN_MAX	5		/* the highest numbered one */
 
 /*
  * -----------------------
Only in nasm-0.98.08: nasm.h.orig
Only in nasm-0.98.08: nasm.h.rej
diff -ur orig/nasm-0.98.08/outelf.c nasm-0.98.08/outelf.c
--- orig/nasm-0.98.08/outelf.c	Mon Mar  5 04:09:12 2001
+++ nasm-0.98.08/outelf.c	Mon Apr  2 16:11:10 2001
@@ -21,12 +21,23 @@
 /*
  * Relocation types.
  */
-#define R_386_32 1		       /* ordinary absolute relocation */
-#define R_386_PC32 2		       /* PC-relative relocation */
-#define R_386_GOT32 3		       /* an offset into GOT */
-#define R_386_PLT32 4		       /* a PC-relative offset into PLT */
-#define R_386_GOTOFF 9		       /* an offset from GOT base */
-#define R_386_GOTPC 10		       /* a PC-relative offset _to_ GOT */
+enum reloc_type {
+  R_386_32        =  1,		/* ordinary absolute relocation */
+  R_386_PC32      =  2,		/* PC-relative relocation */
+  R_386_GOT32     =  3,		/* an offset into GOT */
+  R_386_PLT32     =  4,		/* a PC-relative offset into PLT */
+  R_386_COPY      =  5,		/* ??? */
+  R_386_GLOB_DAT  =  6,		/* ??? */
+  R_386_JUMP_SLOT =  7,		/* ??? */
+  R_386_RELATIVE  =  8,		/* ??? */
+  R_386_GOTOFF    =  9,		/* an offset from GOT base */
+  R_386_GOTPC     = 10,		/* a PC-relative offset _to_ GOT */
+  /* These are GNU extensions, but useful */
+  R_386_16        = 20,		/* A 16-bit absolute relocation */
+  R_386_PC16      = 21,		/* A 16-bit PC-relative relocation */
+  R_386_8         = 22,		/* An 8-bit absolute relocation */
+  R_386_PC8       = 23		/* An 8-bit PC-relative relocation */
+};
 
 struct Reloc {
     struct Reloc *next;
@@ -709,6 +720,7 @@
 	    error(ERR_PANIC, "OUT_RAWDATA with other than NO_SEG");
 	elf_sect_write (s, data, realbytes);
     } else if (type == OUT_ADDRESS) {
+        int gnu16 = 0;
 	addr = *(long *)data;
 	if (segment != NO_SEG) {
 	    if (segment % 2) {
@@ -716,7 +728,12 @@
 		      " segment base references");
 	    } else {
 		if (wrt == NO_SEG) {
+		  if ( realbytes == 2 ) {
+		    gnu16 = 1;
+		    elf_add_reloc (s, segment, R_386_16);
+		  } else {
 		    elf_add_reloc (s, segment, R_386_32);
+		  }
 		} else if (wrt == elf_gotpc_sect+1) {
 		    /*
 		     * The user will supply GOT relative to $$. ELF
@@ -731,8 +748,14 @@
 		    addr = elf_add_gsym_reloc (s, segment, addr,
 					       R_386_GOT32, TRUE);
 		} else if (wrt == elf_sym_sect+1) {
+		  if ( realbytes == 2 ) {
+		    gnu16 = 1;
+		    addr = elf_add_gsym_reloc (s, segment, addr,
+					       R_386_16, FALSE);
+		  } else {
 		    addr = elf_add_gsym_reloc (s, segment, addr,
 					       R_386_32, FALSE);
+		  }
 		} else if (wrt == elf_plt_sect+1) {
 		    error(ERR_NONFATAL, "ELF format cannot produce non-PC-"
 			  "relative PLT references");
@@ -744,14 +767,35 @@
 	    }
 	}
 	p = mydata;
-	if (realbytes != 4 && segment != NO_SEG)
-	    error (ERR_NONFATAL, "ELF format does not support non-32-bit"
-		   " relocations");
-	WRITELONG (p, addr);
+	if (gnu16) {
+	    error(ERR_WARNING|ERR_WARN_GNUELF,
+		  "16-bit relocations in ELF is a GNU extension");
+	  WRITESHORT (p, addr);
+	} else {
+	  if (realbytes != 4 && segment != NO_SEG) {
+	    error (ERR_NONFATAL, "Unsupported non-32-bit ELF relocation");
+	  }
+	  WRITELONG (p, addr);
+	}
 	elf_sect_write (s, mydata, realbytes);
     } else if (type == OUT_REL2ADR) {
-	error (ERR_NONFATAL, "ELF format does not support 16-bit"
-	       " relocations");
+	if (segment == segto)
+	    error(ERR_PANIC, "intra-segment OUT_REL2ADR");
+	if (segment != NO_SEG && segment % 2) {
+	    error(ERR_NONFATAL, "ELF format does not support"
+		  " segment base references");
+	} else {
+	  if (wrt == NO_SEG) {
+	        error (ERR_WARNING|ERR_WARN_GNUELF,
+		       "16-bit relocations in ELF is a GNU extension");
+	        elf_add_reloc (s, segment, R_386_PC16);
+	    } else {
+		error (ERR_NONFATAL, "Unsupported non-32-bit ELF relocation");
+	    }
+	}
+	p = mydata;
+	WRITESHORT (p, *(long*)data - realbytes);
+	elf_sect_write (s, mydata, 2L);
     } else if (type == OUT_REL4ADR) {
 	if (segment == segto)
 	    error(ERR_PANIC, "intra-segment OUT_REL4ADR");
Only in nasm-0.98.08: outelf.c.orig
