[PATCH] D128958: Add assembler plumbing for sanitize_memtag

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 30 16:50:58 PDT 2022


hctim created this revision.
hctim added a reviewer: fmayer.
Herald added subscribers: rupprecht, hiraditya, kristof.beyls.
Herald added a reviewer: jhenderson.
Herald added a reviewer: MaskRay.
Herald added a project: All.
hctim requested review of this revision.
Herald added subscribers: llvm-commits, StephenFan.
Herald added a project: LLVM.

Extends the Asm reader/writer to support reading and writing the
'.tagged' directive (including allowing it on internal global
variables). Also add some extra tooling support, including objdump and
yaml2obj/obj2yaml.

Test that the sanitize_memtag IR attribute produces the expected asm
directive.

Reserves a bit in st_other for AArch64's ELF for signalling to the
linker that a global variable should be tagged. The linker will be
responsible for doing the appropriate setup to ensure that the global
variables are tagged at runtime.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D128958

Files:
  llvm/include/llvm/BinaryFormat/ELF.h
  llvm/include/llvm/MC/MCAsmInfo.h
  llvm/include/llvm/MC/MCDirectives.h
  llvm/include/llvm/MC/MCSymbolELF.h
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/lib/MC/MCAsmStreamer.cpp
  llvm/lib/MC/MCELFStreamer.cpp
  llvm/lib/MC/MCMachOStreamer.cpp
  llvm/lib/MC/MCParser/AsmParser.cpp
  llvm/lib/MC/MCSymbolELF.cpp
  llvm/lib/ObjectYAML/ELFYAML.cpp
  llvm/test/CodeGen/AArch64/global-tagging.ll
  llvm/tools/llvm-objdump/llvm-objdump.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128958.441553.patch
Type: text/x-patch
Size: 9810 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220630/35767a6d/attachment.bin>


More information about the llvm-commits mailing list