Configure gcc to emit .note.GNU-stack for both 32 and 64 bits PowerPC.
Mark gcc-provided asm files as not requiring executable stack. It seems that non-FreeBSD ABIs for powerpc64 claim stack non-executable. Due to this, rs6000_elf_end_indicate_exec_stack() only emit the note for 32 bit target. I decided not to change FreeBSD ABI and patch emit the notes for both variants. Reviewed and tested by: nwhitehorn
This commit is contained in:
parent
434efabd4c
commit
e2e30ff971
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=217396
@ -305,3 +305,5 @@ FUNC_END(_restgpr_15_x)
|
||||
FUNC_END(_restgpr_14_x)
|
||||
|
||||
#endif
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -230,6 +230,8 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
#define TARGET_ASM_FILE_END rs6000_elf_end_indicate_exec_stack
|
||||
|
||||
/* FreeBSD doesn't support saving and restoring 64-bit regs with a 32-bit
|
||||
kernel. This is supported when running on a 64-bit kernel with
|
||||
COMPAT_FREEBSD32, but tell GCC it isn't so that our 32-bit binaries
|
||||
@ -242,3 +244,5 @@
|
||||
#define PROFILE_HOOK(LABEL) \
|
||||
do { if (TARGET_64BIT) output_profile_hook (LABEL); } while (0)
|
||||
|
||||
#undef NEED_INDICATE_EXEC_STACK
|
||||
#define NEED_INDICATE_EXEC_STACK 1
|
||||
|
@ -18426,7 +18426,7 @@ rs6000_elf_declare_function_name (FILE *file, const char *name, tree decl)
|
||||
static void
|
||||
rs6000_elf_end_indicate_exec_stack (void)
|
||||
{
|
||||
if (TARGET_32BIT)
|
||||
if (NEED_INDICATE_EXEC_STACK)
|
||||
file_end_indicate_exec_stack ();
|
||||
}
|
||||
#endif
|
||||
|
@ -115,3 +115,5 @@ FUNC_START(__trampoline_setup)
|
||||
FUNC_END(__trampoline_setup)
|
||||
|
||||
#endif
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
Loading…
Reference in New Issue
Block a user