1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-08 15:29:37 +00:00

Reset the name of the "current bss segment" before writing bss variables into the output Assembly file.

Then, cc65 can notice a single "#pragma bss-name()" at the beginning of the variables list.
This commit is contained in:
Greg King 2019-05-18 12:16:52 -04:00
parent d56e3adf2f
commit 644d623d31

View File

@ -38,6 +38,7 @@
/* common */
#include "debugflag.h"
#include "segnames.h"
#include "version.h"
#include "xmalloc.h"
#include "xsprintf.h"
@ -419,6 +420,11 @@ void FinishCompile (void)
{
SymEntry* Entry;
/* Reset the BSS segment name to its default; so that the below strcmp()
** will work as expected, at the beginning of the list of variables
*/
SetSegName (SEG_BSS, SEGNAME_BSS);
/* Walk over all global symbols:
** - for functions, do clean-up and optimizations
** - generate code for uninitialized global variables