diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/SDCCglue.c | 5 | ||||
| -rw-r--r-- | src/SDCCmem.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/SDCCglue.c b/src/SDCCglue.c index 7af8bf8..dfb988b 100644 --- a/src/SDCCglue.c +++ b/src/SDCCglue.c @@ -260,6 +260,7 @@ emitRegularMap (memmap *map, bool addPublics, bool arFlag) in the static seg */ newSym = copySymbol (sym); SPEC_OCLS (newSym->etype) = (SPEC_OCLS (sym->etype) == xidata) ? xinit : initializer; + SNPRINTF (newSym->name, sizeof (newSym->name), options.gasOutput ? "%s" : "__xinit_%s", sym->name); SNPRINTF (newSym->rname, sizeof (newSym->rname), options.gasOutput ? "%s" : "__xinit_%s", sym->rname); @@ -2074,7 +2075,7 @@ emitMaps (void) emitRegularMap (code, TRUE, FALSE); if (options.const_seg) - dbuf_tprintf (&code->oBuf, "\t!area\n", options.const_seg); + dbuf_tprintf (&code->oBuf, "\t!area\n", CONST_NAME); emitStaticSeg (statsg, &code->oBuf); if (port->genXINIT) @@ -2084,7 +2085,7 @@ emitMaps (void) } if (initializer) { - dbuf_tprintf (&code->oBuf, "\t!area\n", initializer->sname); + dbuf_tprintf (&code->oBuf, "\t!area\n", INITIALIZER_NAME); emitStaticSeg (initializer, &code->oBuf); } dbuf_tprintf (&code->oBuf, "\t!area\n", c_abs->sname); diff --git a/src/SDCCmem.h b/src/SDCCmem.h index b706da7..feddcba 100644 --- a/src/SDCCmem.h +++ b/src/SDCCmem.h @@ -62,7 +62,7 @@ extern FILE *junkFile; #define STATIC_NAME port->mem.static_name #define HOME_NAME (options.gasOutput ? ".vectors" : port->mem.home_name) #define OVERLAY_NAME port->mem.overlay_name -#define CONST_NAME (options.gasOutput ? ".rodata" : port->mem.const_name) +#define CONST_NAME (options.gasOutput ? ".text.rodata" : port->mem.const_name) #define CABS_NAME port->mem.cabs_name #define XABS_NAME port->mem.xabs_name #define IABS_NAME port->mem.iabs_name |
