summaryrefslogtreecommitdiff
path: root/src/stm8/gen.c
diff options
context:
space:
mode:
authorXavier ASUS <xavi92psx@gmail.com>2019-10-22 02:10:51 +0200
committerXavier ASUS <xavi92psx@gmail.com>2019-10-22 02:10:51 +0200
commit5a0c2910df62b99fee8baec1f4d846217cd9a054 (patch)
tree583963809fe49cbb8b498f6621862589601ba53d /src/stm8/gen.c
parent958912f9285175ff95bb0070bea603dd8aef8222 (diff)
downloadsdcc-gas-5a0c2910df62b99fee8baec1f4d846217cd9a054.tar.gz
First working example!
stm8/main.c: 0x8000 must contain the entry point aka "_start" for GNU as. Some work on supporting debugging symbols with --gas. Not finished yet.
Diffstat (limited to 'src/stm8/gen.c')
-rw-r--r--src/stm8/gen.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/stm8/gen.c b/src/stm8/gen.c
index ff195d9..80fd74e 100644
--- a/src/stm8/gen.c
+++ b/src/stm8/gen.c
@@ -2339,7 +2339,12 @@ void
stm8_emitDebuggerSymbol (const char *debugSym)
{
G.debugLine = 1;
- emit2 ("", "%s ==.", debugSym);
+
+ if (options.gasOutput)
+ emit2 ("", "%s:", debugSym);
+ else
+ emit2 ("", "%s ==.", debugSym);
+
G.debugLine = 0;
}
@@ -3358,6 +3363,8 @@ genFunction (iCode *ic)
emit2 (";", " function %s", sym->name);
emit2 (";", "-----------------------------------------");
+ /* Place each new function into its own section so GNU ld
+ * can perform dead code elimination via --gc-sections. */
if (options.function_sections && options.gasOutput)
{
char name[256];