[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 3 15:24:31 PST 2022
MaskRay added inline comments.
================
Comment at: lld/ELF/SyntheticSections.cpp:3871
+ return sizeof(llvm::ELF::Elf64_Nhdr) +
+ /* namesz */ sizeof(kMemtagAndroidNoteName) +
+ /* descsz */ sizeof(uint32_t);
----------------
`/*namesz=*/`
================
Comment at: lld/ELF/SyntheticSections.h:1195
+ : SyntheticSection(llvm::ELF::SHF_ALLOC, llvm::ELF::SHT_NOTE,
+ /* alignment */ 4, ".note.android.memtag") {}
+ void writeTo(uint8_t *buf) override;
----------------
`/*alignment=*/4`
================
Comment at: lld/ELF/Writer.cpp:367
+ if (config->emachine == EM_AARCH64 &&
+ config->memtagMode != llvm::ELF::NT_MEMTAG_LEVEL_DEFAULT) {
+ part.memtagAndroidNote = std::make_unique<MemtagAndroidNote>();
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118948/new/
https://reviews.llvm.org/D118948
More information about the llvm-commits
mailing list