summary refs log tree commit diff
path: root/gas.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas.c')
-rw-r--r--gas.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gas.c b/gas.c
index 339154e..f8f4051 100644
--- a/gas.c
+++ b/gas.c
@@ -19,7 +19,11 @@ gasemitdat(Dat *d, FILE *f)
 	switch (d->type) {
 	case DStart:
 		align = 0;
-		fprintf(f, ".data\n");
+		if (d->u.str) {
+			fprintf(f, ".section %s\n", d->u.str);
+		} else {
+			fprintf(f, ".data\n");
+		}
 		break;
 	case DEnd:
 		break;