[all-commits] [llvm/llvm-project] c574e9: [lld] [MTE] Add DT_AARCH64_MEMTAG_* dynamic entrie...

Mitch Phillips via All-commits all-commits at lists.llvm.org
Wed Mar 1 11:14:29 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c574e93afd2e5f7986abeece88449c84ebd2e76d
      https://github.com/llvm/llvm-project/commit/c574e93afd2e5f7986abeece88449c84ebd2e76d
  Author: Mitch Phillips <31459023+hctim at users.noreply.github.com>
  Date:   2023-03-01 (Wed, 01 Mar 2023)

  Changed paths:
    M lld/ELF/Driver.cpp
    M lld/ELF/SyntheticSections.cpp
    M lld/test/ELF/aarch64-memtag-android-abi.s

  Log Message:
  -----------
  [lld] [MTE] Add DT_AARCH64_MEMTAG_* dynamic entries, and small cleanup

Adds the new AArch64-ABI dynamic entry generation to LLD. This will
allow Android to move from the Android-specific ELF note onto the
dynamic entries.

Change the behaviour of an unspecified --android-memtag-mode. Now, when
unspecified, this will print a warning that you're doing a no-op, rather
than implicitly turning on sync mode. This is important for MTE globals
later, where a binary containing static tagged global descriptors
shouldn't have MTE turned on without specific intent being passed to the
linker.

For now, continue to emit the Android ELF note by default. In future, we
can probably make it only emit the note when provided a flag.

Do a quick NFC-cleanup of the ELF note while we're here. It doesn't
change anything about the ELF note itself, but makes it more clear to
the reader of the code what alignment requirements are being (previously
implicitly) met.

Reviewed By: fmayer, MaskRay

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




More information about the All-commits mailing list