Mercurial > hg > release > icedtea7-2.5
changeset 2797:ce634deafc12
PR2500: Add executable stack markings to callNative.S on JamVM
2015-07-13 Andrew John Hughes <gnu_andrew@member.fsf.org>
PR2500: Add executable stack markings
to callNative.S on JamVM
* Makefile.am:
(ICEDTEA_PATCHES): Add patch.
(jamvm): Drop setting -noexecstack in
LDFLAGS; replaced by code fix in JamVM.
* NEWS: Updated.
* patches/jamvm/noexecstack.patch:
Add notes to assembly files in order to
turn off executable stack.
author | Andrew John Hughes <gnu_andrew@member.fsf.org> |
---|---|
date | Fri, 17 Jul 2015 20:01:27 +0100 |
parents | c931536f194a |
children | 8251173ab7e3 |
files | ChangeLog Makefile.am NEWS patches/jamvm/noexecstack.patch |
diffstat | 4 files changed, 65 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Jul 17 19:59:09 2015 +0100 +++ b/ChangeLog Fri Jul 17 20:01:27 2015 +0100 @@ -1,3 +1,16 @@ +2015-07-13 Andrew John Hughes <gnu_andrew@member.fsf.org> + + PR2500: Add executable stack markings + to callNative.S on JamVM + * Makefile.am: + (ICEDTEA_PATCHES): Add patch. + (jamvm): Drop setting -noexecstack in + LDFLAGS; replaced by code fix in JamVM. + * NEWS: Updated. + * patches/jamvm/noexecstack.patch: + Add notes to assembly files in order to + turn off executable stack. + 2015-07-13 Andrew John Hughes <gnu_andrew@member.fsf.org> PR2499: Update remove-intree-libraries.sh script
--- a/Makefile.am Fri Jul 17 19:59:09 2015 +0100 +++ b/Makefile.am Fri Jul 17 20:01:27 2015 +0100 @@ -281,7 +281,8 @@ if BUILD_JAMVM ICEDTEA_PATCHES += \ - patches/jamvm/pr2050-find_class_from_caller.patch + patches/jamvm/pr2050-find_class_from_caller.patch \ + patches/jamvm/noexecstack.patch endif if ENABLE_NSS @@ -2137,7 +2138,6 @@ stamps/jamvm.stamp: $(OPENJDK_TREE) stamps/rt.stamp if BUILD_JAMVM cd jamvm/jamvm && \ - LDFLAGS="-Xlinker -z -Xlinker noexecstack" \ ./autogen.sh --with-java-runtime-library=openjdk7 \ --prefix=$(abs_top_builddir)/jamvm/install ; \ $(MAKE) ; \
--- a/NEWS Fri Jul 17 19:59:09 2015 +0100 +++ b/NEWS Fri Jul 17 20:01:27 2015 +0100 @@ -34,6 +34,8 @@ - PR2499: Update remove-intree-libraries.sh script * CACAO - PR2380: Raise javadoc and JAVAC_FLAGS memory limits for CACAO +* JamVM + - PR2500: Add executable stack markings to callNative.S on JamVM * PPC & AIX port - S8069590: AIX port of "8050807: Better performing performance data handling" - S8078482, PR2307: ppc: pass thread to throw_AbstractMethodError
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/jamvm/noexecstack.patch Fri Jul 17 20:01:27 2015 +0100 @@ -0,0 +1,48 @@ +diff --git a/src/os/linux/arm/callNative.S jamvm/jamvm/src/os/linux/arm/callNative.S +index 245afd1..1583023 100644 +--- jamvm.orig/jamvm/src/os/linux/arm/callNative.S ++++ jamvm/jamvm/src/os/linux/arm/callNative.S +@@ -36,3 +36,7 @@ + #include "callNativeOABI.S" + #endif + #endif ++ ++#if defined(__linux__) && defined(__ELF__) ++.section .note.GNU-stack,"",%progbits ++#endif +diff --git jamvm.orig/jamvm/src/os/linux/mips/callNative.S jamvm/jamvm/src/os/linux/mips/callNative.S +index cede343..90d9163 100644 +--- jamvm.orig/jamvm/src/os/linux/mips/callNative.S ++++ jamvm/jamvm/src/os/linux/mips/callNative.S +@@ -184,3 +184,7 @@ return: + j $31 + .end callJNIMethod + #endif ++ ++#if defined(__linux__) && defined(__ELF__) ++.section .note.GNU-stack,"",%progbits ++#endif +diff --git jamvm.orig/jamvm/src/os/linux/powerpc/callNative.S jamvm/jamvm/src/os/linux/powerpc/callNative.S +index aa47f6a..763dc0a 100644 +--- jamvm.orig/jamvm/src/os/linux/powerpc/callNative.S ++++ jamvm/jamvm/src/os/linux/powerpc/callNative.S +@@ -281,3 +281,7 @@ return: + mr 1,11 + blr + #endif ++ ++#if defined(__linux__) && defined(__ELF__) ++.section .note.GNU-stack,"",%progbits ++#endif +diff --git jamvm.orig/jamvm/src/os/linux/x86_64/callNative.S jamvm/jamvm/src/os/linux/x86_64/callNative.S +index 26404e6..9fb5cdf 100644 +--- jamvm.orig/jamvm/src/os/linux/x86_64/callNative.S ++++ jamvm/jamvm/src/os/linux/x86_64/callNative.S +@@ -267,3 +267,7 @@ float_ret: + addq $8, %rcx + jmp return + #endif ++ ++#if defined(__linux__) && defined(__ELF__) ++.section .note.GNU-stack,"",%progbits ++#endif