]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Fix BTI support in libgcc [PR96001]
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 2 Jul 2020 16:11:56 +0000 (17:11 +0100)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:16:58 +0000 (13:16 -0300)
commit6559ff5f9d2b659c1d1480c3f5d34bca57fd699d
tree9440186fb497c81e907c10ffd9d4bd8e80a9ccf0
parent12e9bec3948ae0d33015d25e802fde507bd38642
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.
libgcc/config/aarch64/lse.S