7019808: build fails on Fedora 14: SELinux run-time check: execution of stack in libjvm.so
authordsamersoff
Fri, 29 Apr 2011 21:13:00 +0400
changeset 9406 e496a3f30199
parent 9405 d2e9ee78c3c1
child 9407 c985006c2940
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
hotspot/make/linux/makefiles/vm.make
--- a/hotspot/make/linux/makefiles/vm.make	Thu Apr 28 08:24:46 2011 -0700
+++ b/hotspot/make/linux/makefiles/vm.make	Fri Apr 29 21:13:00 2011 +0400
@@ -102,6 +102,10 @@
 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
 
 # By default, link the *.o into the library, not the executable.