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

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

https://gcc.gnu.org/g:9a1b74d49e2e25b29675fac4322bb7ba6cec5894

commit r9-8595-g9a1b74d49e2e25b29675fac4322bb7ba6cec5894
Author: Szabolcs Nagy <szabolcs.n...@arm.com>
Date:   Fri Apr 24 17:36:02 2020 +0100

    aarch64: don't emit bti j after NOTE_INSN_DELETED_LABEL [PR94748]

    It was previously discussed that indirect branches cannot go to
    NOTE_INSN_DELETED_LABEL so inserting a landing pad is unnecessary.
    See https://gcc.gnu.org/pipermail/gcc-patches/2019-May/522625.html

    Before the patch a bti j was inserted after the label in

      __attribute__((target("branch-protection=bti")))
      int foo (void)
      {
      label:
        return 0;
      }

    This is not necessary and weakens the security protection.

    gcc/ChangeLog:

            Backport from mainline.
            2020-04-30  Szabolcs Nagy  <szabolcs.n...@arm.com>

            PR target/94748
            * config/aarch64/aarch64-bti-insert.c (rest_of_insert_bti): Remove
            the check for NOTE_INSN_DELETED_LABEL.

    gcc/testsuite/ChangeLog:

            Backport from mainline.
            2020-04-30  Szabolcs Nagy  <szabolcs.n...@arm.com>

            PR target/94748
            * gcc.target/aarch64/pr94748.c: New test.

Reply via email to