[PATCH] D128958: Add assembler plumbing for sanitize_memtag

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 13 10:48:27 PDT 2022


MaskRay added subscribers: Wilco1, peter.smith.
MaskRay added a comment.

The implementation looks good to me. I assume that you have authority to define a value in `SHT_ANDROID_*`.

My only concern is whether regular AArch64 may need something similar in the future, then whether the section name `.memtag.globals` and the directive name `.memtag` may cause a recognition conflict.
Technically the assembler may need to decode the environment from the target triple (`aarch64-linux-android31`) and do different things on Android and on non-Android, but I personally favor different section names/directives
which can help Android migrate to the standard.

@Wilco1 @peter.smith



================
Comment at: llvm/test/MC/AArch64/global-tagging.ll:6
+
+; RUN: obj2yaml %t.o > %t.yaml
+; RUN: FileCheck %s --input-file=%t.yaml --check-prefix=CHECK-YAML
----------------
`>` => `-o`


================
Comment at: llvm/test/MC/AArch64/global-tagging.ll:11
+
+; CHECK-RELOCS: Relocation section '.rela.memtag.globals' {{.*}} contains 4 entries
+; CHECK-YAML:     Sections:
----------------
Instead of interleaving YAML/RELOCS/ASM checks, I think it seems more readable to group YAML/RELOCS/ASM separately.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128958/new/

https://reviews.llvm.org/D128958



More information about the llvm-commits mailing list