diff lwlink/main.c @ 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 a6c9129e5948
children cde1a5a48636
line wrap: on
line diff
--- a/lwlink/main.c	Sun Jan 02 00:59:21 2022 -0700
+++ b/lwlink/main.c	Mon Jan 24 13:55:40 2022 -0700
@@ -84,6 +84,8 @@
 			outformat = OUTPUT_DECB;
 		else if (!strcasecmp(arg, "raw"))
 			outformat = OUTPUT_RAW;
+		else if (!strcasecmp(arg, "raw2"))
+			outformat = OUTPUT_RAW2;
 		else if (!strcasecmp(arg, "lwex0") || !strcasecmp(arg, "lwex"))
 			outformat = OUTPUT_LWEX0;
 		else if (!strcasecmp(arg, "os9"))