build: Enable BIND_NOW
authorFlorian Weimer <fweimer@redhat.com>
Thu, 9 May 2019 12:37:41 +0000 (14:37 +0200)
committerhimanshu <h.himanshu@samsung.com>
Tue, 11 Feb 2020 08:58:20 +0000 (14:28 +0530)
Partial RELRO means that the object is GNU_RELRO but not BIND_NOW.  This
reduces the effectiveness of RELRO.  bluez triggers this because it
enables PIE during the build, and rpmdiff takes this as an indicator
that the best possible hardening is desired.

https://bugzilla.redhat.com/show_bug.cgi?id=983161

Change-Id: I09d90d9b2ce3fa13a0ec220b83ca141301e7a72b
Signed-off-by: himanshu <h.himanshu@samsung.com>
acinclude.m4

index 045138c..5298483 100755 (executable)
@@ -50,7 +50,7 @@ AC_DEFUN([MISC_FLAGS], [
                if (test "${enableval}" = "yes" &&
                                test "${ac_cv_prog_cc_pie}" = "yes"); then
                        misc_cflags="$misc_cflags -fPIC"
-                       misc_ldflags="$misc_ldflags -pie"
+                       misc_ldflags="$misc_ldflags -pie -Wl,-z,now"
                fi
        ])
        if (test "$enable_coverage" = "yes"); then