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