summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2021-09-09 14:35:17 +0200
committerQuentin Carbonneaux <quentin@c9x.me>2021-09-09 14:35:17 +0200
commit52c8eb48ee86c8fd0e44570c31c7de28dea63cf3 (patch)
treee0366bc313e126cdc59913154d1f112e137bc5d0
parent6a69210b0faf33ad4feb6adc97d094022c520978 (diff)
downloadroux-52c8eb48ee86c8fd0e44570c31c7de28dea63cf3.tar.gz
skip nx stack annotation on osx
-rw-r--r--gas.c2
-rw-r--r--main.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/gas.c b/gas.c
index 6d89a89..8c31794 100644
--- a/gas.c
+++ b/gas.c
@@ -98,8 +98,6 @@ gasemitfin(FILE *f)
 	int sz, i;
 	double d;
 
-	fprintf(f, ".section .note.GNU-stack,\"\",@progbits\n");
-
 	if (!stash)
 		return;
 	fprintf(f, "/* floating point constants */\n.data\n");
diff --git a/main.c b/main.c
index d265475..abef591 100644
--- a/main.c
+++ b/main.c
@@ -193,8 +193,11 @@ main(int ac, char *av[])
 		parse(inf, f, data, func);
 	} while (++optind < ac);
 
-	if (!dbg)
+	if (!dbg) {
 		gasemitfin(outf);
+		if (asm == Gaself)
+			fprintf(outf, ".section .note.GNU-stack,\"\",@progbits\n");
+	}
 
 	exit(0);
 }