From ce7c8316e41c4f26466c3491a5a16317f8b913fb Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 19 Jun 2015 09:28:32 +0200 Subject: [PATCH] wafsamba: Also build libraries with RELRO protection BUG: https://bugzilla.samba.org/show_bug.cgi?id=11346 Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner (cherry picked from commit 893b5f81441bbc98ef403855ec8e2e39569479d2) --- buildtools/wafsamba/wafsamba.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index 188e535..39d9605 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -239,6 +239,8 @@ def SAMBA_LIBRARY(bld, libname, source, bundled_extension, private_library) ldflags = TO_LIST(ldflags) + if bld.env['ENABLE_RELRO'] is True: + ldflags.extend(TO_LIST('-Wl,-z,relro,-z,now')) features = 'cc cshlib symlink_lib install_lib' if pyext: -- 2.4.4