f6cbdf
commit d3c977726064ba09fed6dfc7daf22b16824c97b4
f6cbdf
Author: Mark Wielaard <mark@klomp.org>
f6cbdf
Date:   Fri May 24 18:24:56 2019 +0200
f6cbdf
f6cbdf
    Add -Wl,-z,now to some binaries.
f6cbdf
f6cbdf
diff --git a/auxprogs/Makefile.am b/auxprogs/Makefile.am
f6cbdf
index 1b7842b..e211eec 100644
f6cbdf
--- a/auxprogs/Makefile.am
f6cbdf
+++ b/auxprogs/Makefile.am
f6cbdf
@@ -32,7 +32,7 @@ valgrind_listener_SOURCES = valgrind-listener.c
f6cbdf
 valgrind_listener_CPPFLAGS  = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
f6cbdf
 valgrind_listener_CFLAGS    = $(AM_CFLAGS_PRI) -fstack-protector-strong
f6cbdf
 valgrind_listener_CCASFLAGS = $(AM_CCASFLAGS_PRI)
f6cbdf
-valgrind_listener_LDFLAGS   = $(AM_CFLAGS_PRI)
f6cbdf
+valgrind_listener_LDFLAGS   = $(AM_CFLAGS_PRI) -Wl,-z,now
f6cbdf
 if VGCONF_PLATVARIANT_IS_ANDROID
f6cbdf
 valgrind_listener_CFLAGS    += -static
f6cbdf
 endif
f6cbdf
@@ -51,7 +51,7 @@ valgrind_di_server_SOURCES   = valgrind-di-server.c
f6cbdf
 valgrind_di_server_CPPFLAGS  = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
f6cbdf
 valgrind_di_server_CFLAGS    = $(AM_CFLAGS_PRI) -fstack-protector-strong
f6cbdf
 valgrind_di_server_CCASFLAGS = $(AM_CCASFLAGS_PRI)
f6cbdf
-valgrind_di_server_LDFLAGS   = $(AM_CFLAGS_PRI)
f6cbdf
+valgrind_di_server_LDFLAGS   = $(AM_CFLAGS_PRI) -Wl,-z,now
f6cbdf
 if VGCONF_PLATVARIANT_IS_ANDROID
f6cbdf
 valgrind_di_server_CFLAGS    += -static
f6cbdf
 endif
f6cbdf
@@ -86,7 +86,7 @@ getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES   = getoff.c
f6cbdf
 getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS  = $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
f6cbdf
 getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS    = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -fstack-protector-strong
f6cbdf
 getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CCASFLAGS = $(AM_CCASFLAGS_PRI)
f6cbdf
-getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS   = $(AM_CFLAGS_PRI) @LIB_UBSAN@
f6cbdf
+getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS   = $(AM_CFLAGS_PRI) @LIB_UBSAN@ -Wl,-z,now
f6cbdf
 if HAVE_DLINFO_RTLD_DI_TLS_MODID
f6cbdf
 getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDADD = $(LDADD) -ldl
f6cbdf
 endif
f6cbdf
diff --git a/cachegrind/Makefile.am b/cachegrind/Makefile.am
f6cbdf
index f572741..1c07e50 100644
f6cbdf
--- a/cachegrind/Makefile.am
f6cbdf
+++ b/cachegrind/Makefile.am
f6cbdf
@@ -27,7 +27,7 @@ cg_merge_SOURCES = cg_merge.c
f6cbdf
 cg_merge_CPPFLAGS  = $(AM_CPPFLAGS_PRI)
f6cbdf
 cg_merge_CFLAGS    = $(AM_CFLAGS_PRI) -fstack-protector-strong
f6cbdf
 cg_merge_CCASFLAGS = $(AM_CCASFLAGS_PRI)
f6cbdf
-cg_merge_LDFLAGS   = $(AM_CFLAGS_PRI)
f6cbdf
+cg_merge_LDFLAGS   = $(AM_CFLAGS_PRI) -Wl,-z,now
f6cbdf
 # If there is no secondary platform, and the platforms include x86-darwin,
f6cbdf
 # then the primary platform must be x86-darwin.  Hence:
f6cbdf
 if ! VGCONF_HAVE_PLATFORM_SEC
f6cbdf
diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
f6cbdf
index 3c73210..fb6b7bb 100644
f6cbdf
--- a/coregrind/Makefile.am
f6cbdf
+++ b/coregrind/Makefile.am
f6cbdf
@@ -57,7 +57,7 @@ RANLIB = ${LTO_RANLIB}
f6cbdf
 valgrind_CPPFLAGS  = $(AM_CPPFLAGS_PRI)
f6cbdf
 valgrind_CFLAGS    = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fstack-protector-strong
f6cbdf
 valgrind_CCASFLAGS = $(AM_CCASFLAGS_PRI)
f6cbdf
-valgrind_LDFLAGS   = $(AM_CFLAGS_PRI) @LIB_UBSAN@
f6cbdf
+valgrind_LDFLAGS   = $(AM_CFLAGS_PRI) @LIB_UBSAN@ -Wl,-z,now
f6cbdf
 # If there is no secondary platform, and the platforms include x86-darwin,
f6cbdf
 # then the primary platform must be x86-darwin.  Hence:
f6cbdf
 if ! VGCONF_HAVE_PLATFORM_SEC
f6cbdf
@@ -96,7 +96,7 @@ endif
f6cbdf
 vgdb_CPPFLAGS  = $(AM_CPPFLAGS_PRI)
f6cbdf
 vgdb_CFLAGS    = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fstack-protector-strong
f6cbdf
 vgdb_CCASFLAGS = $(AM_CCASFLAGS_PRI)
f6cbdf
-vgdb_LDFLAGS   = $(AM_CFLAGS_PRI) @LIB_UBSAN@
f6cbdf
+vgdb_LDFLAGS   = $(AM_CFLAGS_PRI) @LIB_UBSAN@ -Wl,-z,now
f6cbdf
 if VGCONF_PLATVARIANT_IS_ANDROID
f6cbdf
 vgdb_CFLAGS    += -static
f6cbdf
 endif