Use ELF notes to set the desired memory tagging level.
Use a note in executables to specify
(none|sync|async) heap tagging level. To be extended with (heap x stack x
globals) in the future. A missing note disables all tagging.
Bug: b/135772972
Test: bionic-unit-tests (in a future change)
Change-Id: Iab145a922c7abe24cdce17323f9e0c1063cc1321
diff --git a/libc/private/bionic_asm_note.h b/libc/private/bionic_asm_note.h
index c335c5a..80b8f01 100644
--- a/libc/private/bionic_asm_note.h
+++ b/libc/private/bionic_asm_note.h
@@ -30,3 +30,4 @@
#define NT_TYPE_IDENT 1
#define NT_TYPE_KUSER 3
+#define NT_TYPE_MEMTAG 4