From 10fe719d7a485599f7f8d9965c5cbd48bedc7a43 Mon Sep 17 00:00:00 2001 From: Ivo Raisr Date: Fri, 2 Oct 2015 16:45:01 +0000 Subject: [PATCH] Explicitly mark the stack as non-executable for Solaris binaries (Valgrind launcher and tools). Follow-up for r15692. n-i-bz git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15696 --- Makefile.tool.am | 3 ++- coregrind/Makefile.am | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.tool.am b/Makefile.tool.am index d7198825ec..5af3023d92 100644 --- a/Makefile.tool.am +++ b/Makefile.tool.am @@ -37,7 +37,8 @@ TOOL_LDFLAGS_COMMON_LINUX = \ TOOL_LDFLAGS_COMMON_DARWIN = \ -nodefaultlibs -nostartfiles -Wl,-u,__start -Wl,-e,__start TOOL_LDFLAGS_COMMON_SOLARIS = \ - -static -nodefaultlibs -nostartfiles -u _start + -static -nodefaultlibs -nostartfiles -u _start \ + -Wl,-M,/usr/lib/ld/map.noexstk TOOL_LDFLAGS_X86_LINUX = \ $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am index 7f25f489df..d29f9549e4 100644 --- a/coregrind/Makefile.am +++ b/coregrind/Makefile.am @@ -66,6 +66,9 @@ if VGCONF_PLATVARIANT_IS_ANDROID valgrind_CFLAGS += -static valgrind_LDFLAGS += -Wl,-z,noexecstack endif +if VGCONF_OS_IS_SOLARIS +valgrind_LDFLAGS += -Wl,-M,/usr/lib/ld/map.noexstk +endif vgdb_SOURCES = vgdb.c -- 2.47.2