[all-commits] [llvm/llvm-project] e305dc: Do not link asan_rtl_x86_64.S for non x86_64 platf...

Casey Smalley via All-commits all-commits at lists.llvm.org
Tue May 9 11:12:46 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e305dcc6fdc7e0efc0de4091a49386923e3845b4
  Author: Casey Smalley <casey.smalley at arm.com>
  Date:   2023-05-09 (Tue, 09 May 2023)

  Changed paths:
    M compiler-rt/lib/asan/CMakeLists.txt

  Log Message:
  Do not link asan_rtl_x86_64.S for non x86_64 platforms.

Do not link asan_rtl_x86_64.S for non x86_64 platforms.

Prior to this CL asan_rtl_x86_64.S would be always be linked when
building compiler-rt for non x86_64 platforms, this normally isn't an
issue since at that link time is an empty file anyway.

When attempting to link a Aarch64 program with branch protection enabled
with the address sanitizer.

clang --target=aarch64 \
      -fsanitize=address \
      -mbranch-protection=standard \
      -o test \

Results in the linking error from the sections generated from the empty
asan_rtl_x86_64.S owed to missing a .note.gnu.property

Also see [[ https://bugs.chromium.org/p/chromium/issues/detail?id=1427165 | https://bugs.chromium.org/p/chromium/issues/detail?id=1427165 ]]

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D149957

More information about the All-commits mailing list