[all-commits] [llvm/llvm-project] 786c89: [ELF][MTE] Add --android-memtag-* options to synth...

Mitch Phillips via All-commits all-commits at lists.llvm.org
Mon Apr 4 11:17:55 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 786c89fed379186972521895acad6c6a9878af26
      https://github.com/llvm/llvm-project/commit/786c89fed379186972521895acad6c6a9878af26
  Author: Mitch Phillips <31459023+hctim at users.noreply.github.com>
  Date:   2022-04-04 (Mon, 04 Apr 2022)

  Changed paths:
    M lld/ELF/Config.h
    M lld/ELF/Driver.cpp
    M lld/ELF/Options.td
    M lld/ELF/SyntheticSections.cpp
    M lld/ELF/SyntheticSections.h
    M lld/ELF/Writer.cpp
    A lld/test/ELF/aarch64-memtag-android-abi.s

  Log Message:
  -----------
  [ELF][MTE] Add --android-memtag-* options to synthesize ELF notes

This ELF note is aarch64 and Android-specific. It specifies to the
dynamic loader that specific work should be scheduled to enable MTE
protection of stack and heap regions.

Current synthesis of the ".note.android.memtag" ELF note is done in the
Android build system. We'd like to move that to the compiler. This patch
adds the --memtag-stack, --memtag-heap, and --memtag-mode={async, sync,
none} flags to the linker, which synthesises the note for us.

Future changes will add -fsanitize=memtag* flags to clang which will
pass these through to lld.

Depends on D119381.

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




More information about the All-commits mailing list