[lld] [lld] [MTE] Drop MTE globals for fully static executables, not ban (PR #68217)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 6 05:43:49 PDT 2023


================
@@ -251,6 +251,15 @@ void elf::addReservedSymbols() {
   ElfSym::edata2 = add("_edata", -1);
 }
 
+// Fully static executables can't have MTE globals, because we need:
----------------
smithp35 wrote:

I think it would be possible to support with static linking using the same model as ifuncs. Essentially embedding a minimal dynamic loader into the static library that just knows how to process the relocations, use linker defined symbols to identify the bounds of the sections.

Perhaps worth changing the first sentence to something like:
"Fully static executables do not support MTE globals as we currently rely on the dynamic linker for:
" 

https://github.com/llvm/llvm-project/pull/68217


More information about the llvm-commits mailing list