ref: 2c113af58d9f63bc4f720adbb6aa8ac2cae52781
parent: 6fb0d750b296506f31cfd0871fdac82ee878834b
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);