summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-01-27 00:05:56 -0800
committerOri Bernstein <ori@eigenstate.org>2018-01-27 00:05:56 -0800
commit2c113af58d9f63bc4f720adbb6aa8ac2cae52781 (patch)
treefcb19bae08e08b60bf53363af9e30983abdd4349
parent6fb0d750b296506f31cfd0871fdac82ee878834b (diff)
downloadmc-autoexpr.tar.gz
Put data into sections too.autoexpr
-rw-r--r--6/gengas.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/6/gengas.c b/6/gengas.c
index 805bada..ad93284 100644
--- a/6/gengas.c
+++ b/6/gengas.c
@@ -382,6 +382,8 @@ gentype(FILE *fd, Type *ty)
b = tydescblob(ty);
if (b->isglobl)
b->iscomdat = 1;
+ if (asmsyntax == Gnugaself)
+ fprintf(fd, ".section .data.%s,\"aw\",@progbits\n", b->lbl);
writeblob(fd, b);
blobfree(b);
}
@@ -416,6 +418,8 @@ genblob(FILE *fd, Node *blob, Htab *globls, Htab *strtab)
lbl = htget(globls, blob);
if (blob->decl.vis != Visintern)
fprintf(fd, ".globl %s\n", lbl);
+ if (asmsyntax == Gnugaself)
+ fprintf(fd, ".section .data.%s,\"aw\",@progbits\n", lbl);
if (blob->decl.init) {
fprintf(fd, ".align %zd\n", tyalign(decltype(blob)));
fprintf(fd, "%s:\n", lbl);