summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw44@gmail.com>2016-01-21 18:10:01 +0800
committerTing-Wei Lan <lantw44@gmail.com>2016-01-21 18:10:37 +0800
commit66ad0d4458067bd5d4dc19373946f767b2525233 (patch)
treec08d414c9ee0cd632ac6a5f09aaaf7c55affce6c
parentc0bb99f107c7f9446ac5a8b59ddeaf0d0e34fd02 (diff)
downloadcompiler2015-66ad0d4458067bd5d4dc19373946f767b2525233.tar
compiler2015-66ad0d4458067bd5d4dc19373946f767b2525233.tar.gz
compiler2015-66ad0d4458067bd5d4dc19373946f767b2525233.tar.bz2
compiler2015-66ad0d4458067bd5d4dc19373946f767b2525233.tar.lz
compiler2015-66ad0d4458067bd5d4dc19373946f767b2525233.tar.xz
compiler2015-66ad0d4458067bd5d4dc19373946f767b2525233.tar.zst
compiler2015-66ad0d4458067bd5d4dc19373946f767b2525233.zip
Don't replace main with _start_MAIN
TA always uses MAIN.
-rw-r--r--src/code-generation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/code-generation.c b/src/code-generation.c
index 35397b8..644e7c5 100644
--- a/src/code-generation.c
+++ b/src/code-generation.c
@@ -1265,7 +1265,7 @@ static void generate_function(CcmmcAst *function, CcmmcState *state)
const char *func_name = function->child->right_sibling->value_id.name;
const char *symbol_name = func_name;
// XXX: We have to rewrite some names to workaround TA's broken toolchain
- if (strcmp(func_name, "main") == 0 || strcmp(func_name, "MAIN") == 0)
+ if (strcmp(func_name, "MAIN") == 0)
symbol_name = "_start_MAIN";
fprintf(state->asm_output,
"\t.type\t%s, %%function\n"