[PATCH] D143769: [lld] [MTE] Add DT_AARCH64_MEMTAG_* dynamic entries, and small cleanup

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 10 10:56:38 PST 2023


hctim created this revision.
hctim added a reviewer: fmayer.
Herald added subscribers: kristof.beyls, arichardson, emaste.
Herald added a reviewer: MaskRay.
Herald added a project: All.
hctim requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143769

Files:
  lld/ELF/Driver.cpp
  lld/ELF/SyntheticSections.cpp
  lld/test/ELF/aarch64-memtag-android-abi.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143769.496554.patch
Type: text/x-patch
Size: 8365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230210/aba1043e/attachment-0001.bin>


More information about the llvm-commits mailing list