[all-commits] [llvm/llvm-project] 850def: Add assembler plumbing for sanitize_memtag
Mitch Phillips via All-commits
all-commits at lists.llvm.org
Thu Dec 1 10:51:11 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 850defb86164f1a68816b21f31529d871400a454
https://github.com/llvm/llvm-project/commit/850defb86164f1a68816b21f31529d871400a454
Author: Mitch Phillips <31459023+hctim at users.noreply.github.com>
Date: 2022-12-01 (Thu, 01 Dec 2022)
Changed paths:
M clang/test/Driver/memtag-stack.c
A clang/test/Driver/memtag-stack_lto.c
R clang/test/Driver/memtag_lto.c
M llvm/include/llvm/BinaryFormat/ELF.h
M llvm/include/llvm/MC/MCAsmInfo.h
M llvm/include/llvm/MC/MCDirectives.h
M llvm/include/llvm/MC/MCELFObjectWriter.h
M llvm/include/llvm/MC/MCSymbolELF.h
M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
M llvm/lib/MC/ELFObjectWriter.cpp
M llvm/lib/MC/MCAsmStreamer.cpp
M llvm/lib/MC/MCELFStreamer.cpp
M llvm/lib/MC/MCMachOStreamer.cpp
M llvm/lib/MC/MCParser/AsmParser.cpp
M llvm/lib/MC/MCSymbolELF.cpp
M llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp
A llvm/test/MC/AArch64/global-tagging.ll
Log Message:
-----------
Add assembler plumbing for sanitize_memtag
Extends the Asm reader/writer to support reading and writing the
'.memtag' 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.
Uses the new Aarch64 MemtagABI specification
(https://github.com/ARM-software/abi-aa/blob/main/memtagabielf64/memtagabielf64.rst)
to identify symbols as tagged in object files. This is done using a
R_AARCH64_NONE relocation that identifies each tagged symbol, and these
relocations are tagged in a special SHT_AARCH64_MEMTAG_GLOBALS_STATIC
section. This signals to the linker that the global variable should be
tagged.
Reviewed By: fmayer, MaskRay, peter.smith
Differential Revision: https://reviews.llvm.org/D128958
More information about the All-commits
mailing list