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:
parent
d9f5b2a40e
commit
4e96980d5a
@ -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"},
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user