Commit 54b3d52c by Dragan Mladjenovic

Emit .note.GNU-stack for hard-float linux targets.

libgcc/ChangeLog:

2020-01-23  Dragan Mladjenovic  <dmladjenovic@wavecomp.com>

	* config/mips/gnustack.h: Check for TARGET_LIBC_GNUSTACK also.

gcc/ChangeLog:

2020-01-23  Dragan Mladjenovic  <dmladjenovic@wavecomp.com>

	* config.in: Regenerated.
	* config/mips/linux.h (NEED_INDICATE_EXEC_STACK): Define to 1
	for TARGET_LIBC_GNUSTACK.
	* configure: Regenerated.
	* configure.ac: Define TARGET_LIBC_GNUSTACK if glibc version is
	found to be 2.31 or greater.
parent a3c1e1f2
2020-01-23 Dragan Mladjenovic <dmladjenovic@wavecomp.com> 2020-01-23 Dragan Mladjenovic <dmladjenovic@wavecomp.com>
* config.in: Regenerated.
* config/mips/linux.h (NEED_INDICATE_EXEC_STACK): Define to 1
for TARGET_LIBC_GNUSTACK.
* configure: Regenerated.
* configure.ac: Define TARGET_LIBC_GNUSTACK if glibc version is
found to be 2.31 or greater.
2020-01-23 Dragan Mladjenovic <dmladjenovic@wavecomp.com>
* config/mips/linux.h (NEED_INDICATE_EXEC_STACK): Define to * config/mips/linux.h (NEED_INDICATE_EXEC_STACK): Define to
TARGET_SOFT_FLOAT. TARGET_SOFT_FLOAT.
* config/mips/mips.c (TARGET_ASM_FILE_END): Define to ... * config/mips/mips.c (TARGET_ASM_FILE_END): Define to ...
......
...@@ -53,4 +53,8 @@ along with GCC; see the file COPYING3. If not see ...@@ -53,4 +53,8 @@ along with GCC; see the file COPYING3. If not see
#undef NEED_INDICATE_EXEC_STACK #undef NEED_INDICATE_EXEC_STACK
#ifdef TARGET_LIBC_GNUSTACK
#define NEED_INDICATE_EXEC_STACK 1
#else
#define NEED_INDICATE_EXEC_STACK TARGET_SOFT_FLOAT #define NEED_INDICATE_EXEC_STACK TARGET_SOFT_FLOAT
#endif
...@@ -6247,6 +6247,18 @@ if test x$gcc_cv_libc_provides_hwcap_in_tcb = xyes; then ...@@ -6247,6 +6247,18 @@ if test x$gcc_cv_libc_provides_hwcap_in_tcb = xyes; then
[Define if your target C Library provides the AT_HWCAP value in the TCB]) [Define if your target C Library provides the AT_HWCAP value in the TCB])
fi fi
# Check if the target LIBC handles PT_GNU_STACK.
gcc_cv_libc_gnustack=unknown
case "$target" in
mips*-*-linux*)
GCC_GLIBC_VERSION_GTE_IFELSE([2], [31], [gcc_cv_libc_gnustack=yes], )
;;
esac
if test x$gcc_cv_libc_gnustack = xyes; then
AC_DEFINE(TARGET_LIBC_GNUSTACK, 1,
[Define if your target C Library properly handles PT_GNU_STACK])
fi
AC_MSG_CHECKING(dl_iterate_phdr in target C library) AC_MSG_CHECKING(dl_iterate_phdr in target C library)
gcc_cv_target_dl_iterate_phdr=unknown gcc_cv_target_dl_iterate_phdr=unknown
case "$target" in case "$target" in
......
2020-01-23 Dragan Mladjenovic <dmladjenovic@wavecomp.com> 2020-01-23 Dragan Mladjenovic <dmladjenovic@wavecomp.com>
* config/mips/gnustack.h: Check for TARGET_LIBC_GNUSTACK also.
2020-01-23 Dragan Mladjenovic <dmladjenovic@wavecomp.com>
* config/mips/gnustack.h: New file. * config/mips/gnustack.h: New file.
* config/mips/crti.S: Include gnustack.h. * config/mips/crti.S: Include gnustack.h.
* config/mips/crtn.S: Likewise. * config/mips/crtn.S: Likewise.
......
#include "config.h" #include "config.h"
#if defined(__ELF__) && defined(__linux__) #if defined(__ELF__) && defined(__linux__)
#if defined (__mips_soft_float) #if defined (TARGET_LIBC_GNUSTACK) || defined (__mips_soft_float)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
.previous .previous
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment