comparison 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
comparison
equal deleted inserted replaced
522:01bdad2118aa 523:1744f2d1a821
82 // output format 82 // output format
83 if (!strcasecmp(arg, "decb")) 83 if (!strcasecmp(arg, "decb"))
84 outformat = OUTPUT_DECB; 84 outformat = OUTPUT_DECB;
85 else if (!strcasecmp(arg, "raw")) 85 else if (!strcasecmp(arg, "raw"))
86 outformat = OUTPUT_RAW; 86 outformat = OUTPUT_RAW;
87 else if (!strcasecmp(arg, "raw2"))
88 outformat = OUTPUT_RAW2;
87 else if (!strcasecmp(arg, "lwex0") || !strcasecmp(arg, "lwex")) 89 else if (!strcasecmp(arg, "lwex0") || !strcasecmp(arg, "lwex"))
88 outformat = OUTPUT_LWEX0; 90 outformat = OUTPUT_LWEX0;
89 else if (!strcasecmp(arg, "os9")) 91 else if (!strcasecmp(arg, "os9"))
90 outformat = OUTPUT_OS9; 92 outformat = OUTPUT_OS9;
91 else if (!strcasecmp(arg, "srec")) 93 else if (!strcasecmp(arg, "srec"))