From 955dcd27ca09d5f9174dc4b36bfa6da549df39e2 Mon Sep 17 00:00:00 2001 From: Vincent Cheng Date: Sun, 13 Nov 2016 06:57:56 +0000 Subject: [PATCH] Build with the "read-only relocation" hardening linker flag Forwarded: http://trac.wildfiregames.com/ticket/1416 Last-Update: 2016-11-12 Pass "-Wl,-z,relro" to the linker. This fixes lintian warning "hardening-no-relro". Gbp-Pq: Name enable-hardening-relro.patch --- build/premake/premake4.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/premake/premake4.lua b/build/premake/premake4.lua index 8473679..44af3a5 100644 --- a/build/premake/premake4.lua +++ b/build/premake/premake4.lua @@ -283,7 +283,7 @@ function project_set_build_flags() if os.is("linux") or os.is("bsd") then buildoptions { "-fPIC" } - linkoptions { "-Wl,--no-undefined", "-Wl,--as-needed" } + linkoptions { "-Wl,--no-undefined", "-Wl,--as-needed", "-Wl,-z,relro" } end if arch == "x86" then -- 2.30.2