summaryrefslogtreecommitdiff
path: root/src/SDCCglue.c
diff options
context:
space:
mode:
authorXavier ASUS <xavi92psx@gmail.com>2019-10-25 01:05:12 +0200
committerXavier ASUS <xavi92psx@gmail.com>2019-10-25 01:05:12 +0200
commit4de313f145d3c9bde748306f48443aadef6cf774 (patch)
treeba07672dc4d3c59705957d721c5cb1bad95c2cdb /src/SDCCglue.c
parent9d2f975be4bd8e9d8f15eb0d013944e46b00c8d2 (diff)
downloadsdcc-gas-4de313f145d3c9bde748306f48443aadef6cf774.tar.gz
DWARF2 debugging (almost) working
Stack pointer setup is removed since it is already set to 0x3FF for the STM8S003F3/K3, according to the datasheet.
Diffstat (limited to 'src/SDCCglue.c')
-rw-r--r--src/SDCCglue.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/SDCCglue.c b/src/SDCCglue.c
index 9255137..a2ed613 100644
--- a/src/SDCCglue.c
+++ b/src/SDCCglue.c
@@ -2512,26 +2512,15 @@ glue (void)
/* create the stack segment MOF */
if (mainf && IFFUNC_HASBODY (mainf->type))
{
- const char *const start_stack = "__start__stack";
const unsigned int size = 1;
fprintf (asmFile, "%s", iComments2);
fprintf (asmFile, "; Stack segment in internal ram \n");
fprintf (asmFile, "%s", iComments2);
- if (options.gasOutput)
- {
- char section_name[100];
-
- snprintf( section_name, sizeof section_name / sizeof *section_name,
- ".%s", start_stack);
- /* Set alloc/write flags. */
- tfprintf(asmFile, "\t!area , \"aw\"\n", section_name);
- tfprintf(asmFile, "\t!local\n", start_stack);
- tfprintf(asmFile, "\t!comm\n\n", start_stack, size, 1);
- }
- else
+ if (!options.gasOutput)
{
+ const char *const start_stack = "__start__stack";
tfprintf(asmFile, "\t!area\n", "SSEG");
tfprintf(asmFile, "\t!labeldef\n", start_stack);
tfprintf(asmFile, "\t!ds\n\n", size);