[Bug libgcc/96001] aarch64: bti is missing from lse.S when built with branch protection

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 13 18:14:39 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96001

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Szabolcs Nagy <nsz@gcc.gnu.org>:

https://gcc.gnu.org/g:8475641c2160262a33c553eee158f075c990fab7

commit r10-8482-g8475641c2160262a33c553eee158f075c990fab7
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date:   Thu Jul 2 17:11:56 2020 +0100

    aarch64: Fix BTI support in libgcc [PR96001]

    lse.S did not have the GNU property note markup and the BTI c
    instructions that are necessary when it is built with branch
    protection.

    The notes are only added when libgcc is built with branch
    protection, because old linkers mishandle the note (merge
    them incorrectly or emit warnings), the BTI instructions
    are added unconditionally.

    Note: BTI c is only necessary at function entry if the function
    may be called indirectly, currently lse functions are not called
    indirectly, but BTI is added for ABI reasons e.g. to allow
    linkers later to emit stub code with indirect jump.

    2020-07-09  Szabolcs Nagy  <szabolcs.nagy@arm.com>

    libgcc/ChangeLog:

            PR target/96001
            * config/aarch64/lse.S: Add BTI marking and related definitions,
            and add BTI c to function entries.

    (cherry picked from commit f0f62fa0320762119446893c67cb52934bc5a05e)


More information about the Gcc-bugs mailing list