[lld] [lld] [MTE] Drop MTE globals for fully static executables, not ban (PR #68217)
Mitch Phillips via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 6 06:48:59 PDT 2023
================
@@ -3029,10 +3029,20 @@ void LinkerDriver::link(opt::InputArgList &args) {
// partition.
copySectionsIntoPartitions();
- if (config->emachine == EM_AARCH64 &&
- config->androidMemtagMode != ELF::NT_MEMTAG_LEVEL_NONE) {
+ if (canHaveMemtagGlobals()) {
llvm::TimeTraceScope timeScope("Process memory tagged symbols");
createTaggedSymbols(ctx.objectFiles);
+ } else if (config->emachine == EM_AARCH64) {
+ // For fully static executables, make sure we prune any potential
+ // SHT_AARCH64_MEMTAG_GLOBALS_STATIC sections.
+ for (InputFile* file : ctx.objectFiles) {
----------------
hctim wrote:
Done, moved it to InputFiles.cpp.
https://github.com/llvm/llvm-project/pull/68217
More information about the llvm-commits
mailing list