Mercurial > hg > icedtea7
changeset 2814:219bd49d5d66
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 | Tue, 14 Jul 2015 02:41:22 +0100 |
parents | 2d4857a0d343 |
children | d5723da37acc |
files | ChangeLog Makefile.am NEWS patches/jamvm/noexecstack.patch |
diffstat | 4 files changed, 64 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Jul 14 01:56:21 2015 +0100 +++ b/ChangeLog Tue Jul 14 02:41:22 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 Tue Jul 14 01:56:21 2015 +0100 +++ b/Makefile.am Tue Jul 14 02:41:22 2015 +0100 @@ -272,7 +272,8 @@ if BUILD_JAMVM ICEDTEA_PATCHES += \ patches/jamvm/find_class_from_caller.patch \ - patches/jamvm/pr2172-tempdir.patch + patches/jamvm/pr2172-tempdir.patch \ + patches/jamvm/noexecstack.patch endif if ENABLE_NSS @@ -2288,7 +2289,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 Tue Jul 14 01:56:21 2015 +0100 +++ b/NEWS Tue Jul 14 02:41:22 2015 +0100 @@ -443,6 +443,7 @@ - PR2520: --enable-cacao builds broken, missing JVM_GetTemporaryDirectory impl. * JamVM - PR2172: --enable-jamvm builds broken, missing JVM_GetTemporaryDirectory impl + - PR2500: Add executable stack markings to callNative.S on JamVM * ARM32 port - PR2228: Add ARM32 JIT - PR2297: Use the IcedTea 2.6.0 HotSpot on ARM32 by default
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/jamvm/noexecstack.patch Tue Jul 14 02:41:22 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