[gcc(refs/users/wschmidt/heads/dd2)] rs6000: ROP cleanup

William Schmidt wschmidt@gcc.gnu.org
Thu Mar 25 20:03:38 GMT 2021


https://gcc.gnu.org/g:8dd186f2e4cb8ac2c192ca1c58277d9bddca9720

commit 8dd186f2e4cb8ac2c192ca1c58277d9bddca9720
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Thu Mar 25 15:03:03 2021 -0500

    rs6000: ROP cleanup
    
    2021-03-25  Bill Schmidt  <wschmidt@linux.ibm.com>
    
    gcc/
            * config/rs6000/rs6000-logue.c (rs6000_stack_info): Set
            rop_check_size in case of error.

Diff:
---
 gcc/config/rs6000/rs6000-logue.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-logue.c b/gcc/config/rs6000/rs6000-logue.c
index 5e91672bea5..10cf7a2de93 100644
--- a/gcc/config/rs6000/rs6000-logue.c
+++ b/gcc/config/rs6000/rs6000-logue.c
@@ -723,9 +723,12 @@ rs6000_stack_info (void)
       && DEFAULT_ABI == ABI_ELFv2 && rs6000_rop_protect)
     info->rop_check_size = 8;
   else if (rs6000_rop_protect && DEFAULT_ABI != ABI_ELFv2)
-    /* We can't check this in rs6000_option_override_internal since
-       DEFAULT_ABI isn't established yet.  */
-    error ("%qs requires the ELFv2 ABI", "-mrop-protect");
+    {
+      /* We can't check this in rs6000_option_override_internal since
+	 DEFAULT_ABI isn't established yet.  */
+      error ("%qs requires the ELFv2 ABI", "-mrop-protect");
+      info->rop_check_size = 0;
+    }
   else
     info->rop_check_size = 0;


More information about the Gcc-cvs mailing list