[MTE] do not use ldg in linker if MTE is off for process
Test: with and without MTE:
atest libprocinfo_test bionic-unit-tests bionic-unit-tests-static debuggerd_test memtag_stack_dlopen_test
Bug: 381781855
Change-Id: I3f6923715d2ce442a2e8c23215f36911b305ede3
diff --git a/libc/private/bionic_globals.h b/libc/private/bionic_globals.h
index cd6dca9..77ac21f 100644
--- a/libc/private/bionic_globals.h
+++ b/libc/private/bionic_globals.h
@@ -146,6 +146,7 @@
size_t scudo_stack_depot_size = 0;
HeapTaggingLevel initial_heap_tagging_level = M_HEAP_TAGGING_LEVEL_NONE;
+ _Atomic(bool) memtag_currently_on = false;
// See comments for __libc_memtag_stack / __libc_memtag_stack_abi above.
bool initial_memtag_stack = false;
bool initial_memtag_stack_abi = false;