]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
i386-mcount.S: Add _CET_ENDBR to _mcount and __fentry__
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 1 Feb 2020 13:44:55 +0000 (05:44 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 1 Feb 2020 13:44:55 +0000 (05:44 -0800)
Since _mcount and __fentry__ don't use ENTRY, we need to add _CET_ENDBR
by hand.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
sysdeps/i386/i386-mcount.S

index 9516265bcbeb61aa9aaf08701afe6decb09110bb..8b60bd20fe51c84535dd1153c26a779e223d7c82 100644 (file)
@@ -30,6 +30,7 @@
        .type C_SYMBOL_NAME(_mcount), @function
        .align ALIGNARG(4)
 C_LABEL(_mcount)
+       _CET_ENDBR
        /* Save the caller-clobbered registers.  */
        pushl %eax
        pushl %ecx
@@ -58,6 +59,7 @@ weak_alias (_mcount, mcount)
        .type C_SYMBOL_NAME(__fentry__), @function
        .align ALIGNARG(4)
 C_LABEL(__fentry__)
+       _CET_ENDBR
        /* Save the caller-clobbered registers.  */
        pushl %eax
        pushl %ecx