This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[MIPS] hsdis need non-executable PT_GNU_STACK support
- From: Leslie Zhai <zhaixiang at loongson dot cn>
- To: Florian Weimer <fweimer at redhat dot com>, faraz dot shahbazker at imgtec dot com, joseph at codesourcery dot com, macro at imgtec dot com
- Cc: 8u-dev <jdk8u-dev at openjdk dot java dot net>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, libc-alpha at sourceware dot org
- Date: Tue, 14 Aug 2018 16:28:07 +0800
- Subject: [MIPS] hsdis need non-executable PT_GNU_STACK support
- References: <d348bfdd-505c-73e0-6434-8d3f6a762880@loongson.cn> <8ffbcb10-c253-c0ef-3c02-4d85e6359766@redhat.com> <4faa30a3-3f3f-95b3-3eac-030644807a81@loongson.cn> <0680a725-2574-286c-5775-320de987b6f1@redhat.com>
Hi all,
hsdis PrintLIRWithAssembly failed to work for mips64el after upgraded to
jdk8u181-b13.
http://mail.openjdk.java.net/pipermail/jdk8u-dev/2018-August/007753.html
The root cause is the patch [MIPS] Enable non-executable PT_GNU_STACK
support, contributed by Faraz in 2016 February, had not been merged by
GCC toolchain upstream.
https://gcc.gnu.org/ml/gcc-patches/2016-02/msg00444.html
And Maciej also need to increase `MAJOR_VERSION` to check whether or not
support IFUNC, unfortunately still not merged by upstream.
https://sourceware.org/ml/libc-alpha/2016-12/msg00856.html
But I would apply the patch and rebuild gcc-8.1, binutils-gdb-2.30,
glibc-2.27, to support Faraz, Joseph and Maciej :)
Thanks for your great job!
在 2018年08月14日 14:15, Florian Weimer 写道:
On 08/14/2018 04:08 AM, Leslie Zhai wrote:
But workaround for mips64el's PrintLIRWithAssembly is adding
-Wl,-z,noexecstack linking flag, strangely X86 does *not* need such
flag, so I am investigating the root cause.
MIPS soft-float apparently needs an executable stack:
<https://sourceware.org/ml/libc-alpha/2016-01/msg00567.html>
<https://sourceware.org/ml/libc-alpha/2016-01/msg00719.html>
This could be why the toolchain does not specify a non-executable
stack by default.
Florian
--
Regards,
Leslie Zhai