ref: ff991b5eb1358c01af30fa167d82d0e367ac464a
parent: 24a566ff1751b246c8b6efd8adea3447975b9efa
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Jan 26 19:05:56 EST 2018
Put data into sections too.
--- a/6/gengas.c
+++ b/6/gengas.c
@@ -382,6 +382,8 @@
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 @@
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);