summarylogtreecommitdiffstats
path: root/binutils226-swift-driver.patch
blob: 994781908d4af549a71bea4e07b0ed8600fd3e9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 5e20ac3..eb4b846 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -1268,6 +1268,9 @@ toolchains::GenericUnix::constructInvocation(const LinkJobAction &job,
     Arguments.push_back(context.Args.MakeArgString("--target=" + getTriple().str()));
   }
 
+  Arguments.push_back("-Wl,-z,nocopyreloc");
+  Arguments.push_back("-Wl,-z,noextern-protected-data");
+
   // Add the runtime library link path, which is platform-specific and found
   // relative to the compiler.
   llvm::SmallString<128> RuntimeLibPath;