shithub: scc

Download patch

ref: d9eeaec45f1f206922711c3dcd6787be15aaefe7
parent: 16ea0054046e540a90a8a44fd81c0f7b4ae8024d
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Jun 8 04:52:22 EDT 2018

[coff] Add more defines

The magic number of the optional header was lost and some
of the defines for file flags were wrong.

--- a/inc/coff32/aouthdr.h
+++ b/inc/coff32/aouthdr.h
@@ -13,3 +13,10 @@
 };
 
 typedef struct aouthdr AOUTHDR;
+
+#define QMAGIC      0314
+#define STMAGIC     0401
+#define OMAGIC      0404
+#define JMAGIC      0407
+#define DMAGIC      0410
+#define ZMAGIC      0413
--- a/inc/coff32/filehdr.h
+++ b/inc/coff32/filehdr.h
@@ -14,13 +14,18 @@
 #define FILHDR struct filehdr
 #define FILHSZ 20
 
-#define F_RELFLG (1 << 0)
-#define F_EXEC   (1 << 1)
-#define F_LMNO   (1 << 2)
-#define F_SYMS   (1 << 3)
-#define F_AR16WR (1 << 4)
-#define F_AR32WR (1 << 5)
-#define F_A32WR  (1 << 6)
+#define F_RELFLG          0000001
+#define F_EXEC            0000002
+#define F_LMNO            0000004
+#define F_SYMS            0000010
+#define F_MINMAL          0000020
+#define F_UPDATE          0000040
+#define F_SWADB           0000100
+#define F_AR16WR          0000200
+#define F_AR32WR          0000400
+#define F_A32WR           0001000
+#define F_PATCH           0002000
+#define F_NODF            0002000
 
 #define COFF_I386MAGIC    0x014c
 #define COFF_Z80MAGIC     0x805a