summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw44@gmail.com>2016-01-03 18:07:08 +0800
committerTing-Wei Lan <lantw44@gmail.com>2016-01-03 18:07:08 +0800
commita43e0f1a061de5a00ab9a3ee912bbc08e53e48ef (patch)
tree62018e269c957abae86dabcc104bcf22c1f33add
parent4a075a02de952d0ec489f60cbb8f534d26ac766e (diff)
downloadcompiler2015-a43e0f1a061de5a00ab9a3ee912bbc08e53e48ef.tar
compiler2015-a43e0f1a061de5a00ab9a3ee912bbc08e53e48ef.tar.gz
compiler2015-a43e0f1a061de5a00ab9a3ee912bbc08e53e48ef.tar.bz2
compiler2015-a43e0f1a061de5a00ab9a3ee912bbc08e53e48ef.tar.lz
compiler2015-a43e0f1a061de5a00ab9a3ee912bbc08e53e48ef.tar.xz
compiler2015-a43e0f1a061de5a00ab9a3ee912bbc08e53e48ef.tar.zst
compiler2015-a43e0f1a061de5a00ab9a3ee912bbc08e53e48ef.zip
Fix linking error caused by missing .align directive
relocation truncated to fit: R_AARCH64_LD_PREL_LO19 against `.rodata'
-rw-r--r--src/code-generation.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/code-generation.c b/src/code-generation.c
index 8bf85a9..072ba7a 100644
--- a/src/code-generation.c
+++ b/src/code-generation.c
@@ -187,6 +187,7 @@ static void generate_expression(CcmmcAst *expr, CcmmcState *state,
fprintf(state->asm_output,
"\tldr\t%s, .LC%zu\n"
"\t.section .rodata\n"
+ "\t.align 2\n"
".LC%zu:\n"
"\t.float\t%.9g\n"
"\t.text\n",