summary refs log tree commit diff
path: root/arm64
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2022-01-31 22:03:18 +0100
committerQuentin Carbonneaux <quentin@c9x.me>2022-02-02 21:09:37 +0100
commit2ca6fb25a238842418019a3f9ee8d1beb1327f7e (patch)
treebe083fc02dc8c1175f454b0adfd23d662f96476f /arm64
parent20ee522ce8c4d1ffdd7b6e24a4f7af587c35404a (diff)
downloadroux-2ca6fb25a238842418019a3f9ee8d1beb1327f7e.tar.gz
shared linkage logic for func/data
Diffstat (limited to 'arm64')
-rw-r--r--arm64/emit.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arm64/emit.c b/arm64/emit.c
index 9700abe..b25f4f5 100644
--- a/arm64/emit.c
+++ b/arm64/emit.c
@@ -446,14 +446,10 @@ arm64_emitfn(Fn *fn, FILE *out)
 	Ins *i;
 	E *e;
 
+	gasemitlnk(fn->name, &fn->lnk, ".text", out);
 	e = &(E){.f = out, .fn = fn};
 	framelayout(e);
 
-	fprintf(e->f, ".text\n");
-	if (e->fn->export)
-		fprintf(e->f, ".globl %s\n", e->fn->name);
-	fprintf(e->f, "%s:\n", e->fn->name);
-
 	if (e->fn->vararg) {
 		for (n=7; n>=0; n--)
 			fprintf(e->f, "\tstr\tq%d, [sp, -16]!\n", n);