246e17
commit 825b58f3fb04781e559858510fe83a8c4bf28425
246e17
Author: H.J. Lu <hjl.tools@gmail.com>
246e17
Date:   Sat Feb 1 05:44:55 2020 -0800
246e17
246e17
    i386-mcount.S: Add _CET_ENDBR to _mcount and __fentry__
246e17
    
246e17
    Since _mcount and __fentry__ don't use ENTRY, we need to add _CET_ENDBR
246e17
    by hand.
246e17
    
246e17
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
246e17
---
246e17
246e17
diff --git a/sysdeps/i386/i386-mcount.S b/sysdeps/i386/i386-mcount.S
246e17
index 3db2fcd..8c8eeb8 100644
246e17
--- a/sysdeps/i386/i386-mcount.S
246e17
+++ b/sysdeps/i386/i386-mcount.S
246e17
@@ -30,6 +30,7 @@
246e17
 	.type C_SYMBOL_NAME(_mcount), @function
246e17
 	.align ALIGNARG(4)
246e17
 C_LABEL(_mcount)
246e17
+	_CET_ENDBR
246e17
 	/* Save the caller-clobbered registers.  */
246e17
 	pushl %eax
246e17
 	pushl %ecx
246e17
@@ -58,6 +59,7 @@ weak_alias (_mcount, mcount)
246e17
 	.type C_SYMBOL_NAME(__fentry__), @function
246e17
 	.align ALIGNARG(4)
246e17
 C_LABEL(__fentry__)
246e17
+	_CET_ENDBR
246e17
 	/* Save the caller-clobbered registers.  */
246e17
 	pushl %eax
246e17
 	pushl %ecx
246e17