shithub: mc

Download patch

ref: cd073622d57cb4e2f3413b5658d1299745b51bc6
parent: f280df62936ff48565f8c83bf609726a6af9a690
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Mar 5 11:52:26 EST 2016

Switch sections at end of type blob.

--- a/6/gengas.c
+++ b/6/gengas.c
@@ -305,7 +305,7 @@
 		return;
 	if (b->lbl) {
 		if (b->iscomdat)
-			fprintf(fd, ".section .text.%s%s,\"axG\",%s%s,comdat\n", Symprefix, b->lbl, Symprefix, b->lbl);
+			fprintf(fd, ".section .text.%s%s,\"aG\",%s%s,comdat\n", Symprefix, b->lbl, Symprefix, b->lbl);
 		if (b->isglobl)
 			fprintf(fd, ".globl %s%s\n", Symprefix, b->lbl);
 		fprintf(fd, "%s%s:\n", Symprefix, b->lbl);
@@ -324,6 +324,8 @@
 			writeblob(fd, b->seq.sub[i]);
 		break;
 	}
+	if (b->lbl && b->iscomdat)
+		fprintf(fd, ".text\n");
 }
 
 /* genfunc requires all nodes in 'nl' to map cleanly to operations that are