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