[gcc(refs/users/wschmidt/heads/dd2)] rs6000: Error when -mrop-protect requested without ELFv2 ABI
William Schmidt
wschmidt@gcc.gnu.org
Thu Mar 18 14:34:20 GMT 2021
https://gcc.gnu.org/g:30db970ead2c75a044f9035d3ae2b5f1393d6fbb
commit 30db970ead2c75a044f9035d3ae2b5f1393d6fbb
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date: Thu Mar 18 09:33:59 2021 -0500
rs6000: Error when -mrop-protect requested without ELFv2 ABI
2021-03-18 Bill Schmidt <wschmidt@linux.ibm.com>
gcc/
* config/rs6000/rs6000.c (rs6000_option_override_internal): Error
if -mrop-protect requested without ELFv2 ABI.
Diff:
---
gcc/config/rs6000/rs6000.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index a3e53ed57fc..bdcf536bfa5 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -4012,6 +4012,10 @@ rs6000_option_override_internal (bool global_init_p)
&& ((rs6000_isa_flags_explicit & OPTION_MASK_QUAD_MEMORY_ATOMIC) == 0))
rs6000_isa_flags |= OPTION_MASK_QUAD_MEMORY_ATOMIC;
+ /* ROP protection is only enabled for ELFv2 at the moment. */
+ if (rs6000_rop_protect && DEFAULT_ABI != ABI_ELFv2)
+ error ("%qs requires the ELFv2 ABI", "-mrop-protect");
+
/* If we are inserting ROP-protect instructions, disable shrink wrap. */
if (rs6000_rop_protect)
{
More information about the Gcc-cvs
mailing list