From: Alan Cox Date: Thu, 12 Feb 2015 02:02:30 +0000 (+0000) Subject: patches/SDCC: Add another change to put string constants in const not code X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=25bc65f8c75e1b54f64b0dcaf655d60f2fafe71f;p=FUZIX.git patches/SDCC: Add another change to put string constants in const not code --- diff --git a/Kernel/patches/SDCC b/Kernel/patches/SDCC index bdc5bd9e..36d3ca58 100644 --- a/Kernel/patches/SDCC +++ b/Kernel/patches/SDCC @@ -1,3 +1,30 @@ +diff -u --recursive sdcc-342/src/SDCCglue.c sdcc/src/SDCCglue.c +--- sdcc-342/src/SDCCglue.c 2014-12-21 01:04:47.000000000 +0000 ++++ sdcc/src/SDCCglue.c 2015-02-12 01:31:04.802185062 +0000 +@@ -1527,14 +1527,22 @@ + emitDebugSym (oBuf, sym); + dbuf_printf (oBuf, " == .\n"); + } +- dbuf_printf (oBuf, "%s:\n", sym->rname); + /* special case for character strings */ + if (IS_ARRAY (sym->type) && IS_CHAR (sym->type->next) && SPEC_CVAL (sym->etype).v_char) + { ++ ++ if (options.const_seg) ++ { ++ dbuf_tprintf (&code->oBuf, "\t!area\n", options.const_seg); ++ } ++ dbuf_printf (oBuf, "%s:\n", sym->rname); + printChar (oBuf, SPEC_CVAL (sym->etype).v_char, size); ++ if (options.const_seg) ++ dbuf_tprintf (oBuf, "\t!areacode\n", options.code_seg); + } + else + { ++ dbuf_printf (oBuf, "%s:\n", sym->rname); + dbuf_tprintf (oBuf, "\t!ds\n", (unsigned int) size & 0xffff); + } + } diff -u --recursive sdcc-342/src/z80/gen.c sdcc/src/z80/gen.c --- sdcc-342/src/z80/gen.c 2014-12-23 21:02:39.000000000 +0000 +++ sdcc/src/z80/gen.c 2015-02-08 16:37:36.657585246 +0000