1
0
forked from mirrors/0ad

Build with the "read-only relocation" hardening linker flag

Summary: Improve binary security by enabling a hardening linker flag.

Test Plan:
Patch already used on Debian.

Tested locally by @Gallaecio as well.

Reviewed By: LudovicRousseau
Trac Tickets: #4894

Differential Revision: https://code.wildfiregames.com/D1123
This was SVN commit r20896.
This commit is contained in:
Gallaecio
2018-01-17 18:01:58 +00:00
parent d9f5b2a40e
commit 4e96980d5a
3 changed files with 3 additions and 2 deletions
@@ -225,6 +225,7 @@
{"nick": "trompetin17", "name": "Juan Guillermo"},
{"nick": "user1", "name": "A. C."},
{"nick": "usey11"},
{"nick": "vincent_c", "name": "Vincent Cheng"},
{"nick": "vladislavbelov", "name": "Vladislav Belov"},
{"nick": "vts", "name": "Jeroen DR"},
{"nick": "WhiteTreePaladin", "name": "Brian Ashley"},
+1 -1
View File
@@ -271,7 +271,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
+1 -1
View File
@@ -257,7 +257,7 @@ function project_set_build_flags()
if os.istarget("linux") or os.istarget("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