From 3fcc2d265f1521c2dcae0734de355962cc6cd7a0 Mon Sep 17 00:00:00 2001 From: Xavier ASUS Date: Mon, 21 Oct 2019 00:22:00 +0200 Subject: More work on GNU as generation On _gas_mapping, label definitions do not allow "::". ":" must be used instead. gasOutput is now part of "options". Unneeded sections, such as HOME/GSINIT/etc., are no longer declared and/or defined. GNU as just does not need them. Startup function name must equal "_start" for GNU ld. The value of some macros, such as CODE_NAME or DATA_NAME, must change according to options.gasOutput, as "CODE" or "DATA" (among many others) are not understood by GNU as. STM8 port now selects GNU as format on --gas switch enabled. --- src/pdk/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/pdk') diff --git a/src/pdk/main.c b/src/pdk/main.c index 21b1fc2..d28f2d4 100644 --- a/src/pdk/main.c +++ b/src/pdk/main.c @@ -68,8 +68,8 @@ pdk_genAssemblerEnd (FILE *of) int pdk_genIVT(struct dbuf_s *oBuf, symbol **intTable, int intCount) { - dbuf_tprintf (oBuf, "\t.area\tHEADER (ABS)\n"); - dbuf_tprintf (oBuf, "\t.org\t 0x0020\n"); + dbuf_tprintf (oBuf, "\t!area\tHEADER (ABS)\n"); + dbuf_tprintf (oBuf, "\t!org\t 0x0020\n"); if (interrupts[0]) dbuf_tprintf (oBuf, "\tgoto\t%s\n", interrupts[0]->rname); else @@ -85,7 +85,7 @@ pdk_genInitStartup (FILE *of) fprintf (of, "\t.org 0x00\n"); fprintf (of, "p::\n"); fprintf (of, "\t.ds 2\n"); - + fprintf (of, "\t.area\tHEADER (ABS)\n"); // In the header we have 16 bytes. First should be nop. fprintf (of, "\t.org 0x0000\n"); @@ -316,7 +316,7 @@ PORT pdk13_port = 0, 2, 1, /* sp points to next free stack location */ - }, + }, { -1, false }, /* no int x int -> long multiplication support routine. */ { 0, { @@ -482,7 +482,7 @@ PORT pdk14_port = 0, 2, 1, /* sp points to next free stack location */ - }, + }, { -1, false }, /* no int x int -> long multiplication support routine. */ { 0, { @@ -648,7 +648,7 @@ PORT pdk15_port = 0, 2, 1, /* sp points to next free stack location */ - }, + }, { -1, false }, /* no int x int -> long multiplication support routine. */ { 0, { -- cgit v1.2.3