Index: src/asm/main.c
--- src/asm/main.c.orig
+++ src/asm/main.c
@@ -34,6 +34,8 @@
 #include "helpers.h"
 #include "version.h"
 
+int pledge(const char *, const char *);
+
 // Old Bison versions (confirmed for 2.3) do not forward-declare `yyparse` in the generated header
 // Unfortunately, macOS still ships 2.3, which is from 2008...
 int yyparse(void);
@@ -307,6 +309,9 @@ int main(int argc, char *argv[])
 	cldefines = malloc(cldefines_bufsize);
 	if (!cldefines)
 		fatalerror("No memory for command line defines\n");
+
+	if (pledge("stdio rpath wpath cpath", NULL) == -1)
+		fatalerror("pledge");
 
 #if defined(YYDEBUG) && YYDEBUG
 	yydebug = 1;
