diff lwlink/lwlink.h @ 523:1744f2d1a821

Change behaviour of --format=raw; old behaviour kept for --format=raw2 Make the default --format=raw output just ignore BSS flagged sections. If you put any in the middle of your code, your output file will break. Don't do dumb things like that. If you really need the old behaviour, change to --format=raw2 Neither behaviour is really ideal but doing the "right" thing is a boatload more complicated and is still going to do the wrong thing from time to time. Most situations will likely load the BSS sections with separate link script directives anyway or be assembling directly to raw without using the linker.
author William Astle <lost@l-w.ca>
date Mon, 24 Jan 2022 13:55:40 -0700
parents 221b5f58d8ad
children cde1a5a48636
line wrap: on
line diff
--- a/lwlink/lwlink.h	Sun Jan 02 00:59:21 2022 -0700
+++ b/lwlink/lwlink.h	Mon Jan 24 13:55:40 2022 -0700
@@ -27,10 +27,11 @@
 #include "expr.h"
 
 #define OUTPUT_DECB		0	// DECB multirecord format
-#define OUTPUT_RAW		1	// raw sequence of bytes
+#define OUTPUT_RAW		1	// raw sequence of bytes; BSS is just not included
 #define OUTPUT_LWEX0	2	// LWOS LWEX binary version 0
 #define OUTPUT_OS9		3	// OS9 object code module
 #define OUTPUT_SREC		4	// motorola SREC format
+#define OUTPUT_RAW2     5   // raw sequence of bytes, BSS converted to NULs
 
 typedef struct symtab_s symtab_t;
 struct symtab_s