7019808: build fails on Fedora 14: SELinux run-time check: execution of stack in libjvm.so
authordsamersoff
Fri Apr 29 21:13:00 2011 +0400 (2 years ago)
changeset 2360dddc5753c53a
parent 23590cddebc420d8
child 2361405c634f4aaa
7019808: build fails on Fedora 14: SELinux run-time check: execution of stack in libjvm.so
Summary: executable flag is set in the elf header of libjvm.so during build, instruct ld to don't do it.
Reviewed-by: acorn, phh
make/linux/makefiles/vm.make
--- a/make/linux/makefiles/vm.make Thu Apr 28 08:24:46 2011 -0700
+++ b/make/linux/makefiles/vm.make Fri Apr 29 21:13:00 2011 +0400
@@ -101,6 +101,10 @@ CFLAGS += $(CFLAGS/NOEX)
# Extra flags from gnumake's invocation or environment
CFLAGS += $(EXTRA_CFLAGS)
LFLAGS += $(EXTRA_CFLAGS)
+
+# Don't set excutable bit on stack segment
+# the same could be done by separate execstack command
+LFLAGS += -Xlinker -z -Xlinker noexecstack
LIBS += -lm -ldl -lpthread