Index: src/link/main.cpp
--- src/link/main.cpp.orig
+++ src/link/main.cpp
@@ -10,6 +10,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 #include <utility>
 
 #include "backtrace.hpp"
@@ -415,6 +416,11 @@ static void verboseOutputConfig() {
 // LCOV_EXCL_STOP
 
 int main(int argc, char *argv[]) {
+	if (pledge("stdio rpath wpath cpath", NULL) == -1) {
+		fputs("pledge", stderr);
+		return 1;
+	}
+
 	cli_ParseArgs(argc, argv, optstring, longopts, parseArg, usage);
 
 	verboseOutputConfig();
