Index: src/link/main.cpp
--- src/link/main.cpp.orig
+++ src/link/main.cpp
@@ -8,6 +8,7 @@
 #include <stdarg.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 #include <utility>
 
 #include "diagnostics.hpp"
@@ -211,6 +212,11 @@ static void parseScrambleSpec(char *spec) {
 }
 
 int main(int argc, char *argv[]) {
+	if (pledge("stdio rpath wpath cpath", NULL) == -1) {
+		fputs("pledge", stderr);
+		return 1;
+	}
+
 	char const *linkerScriptName = nullptr; // -l
 
 	// Parse options
