[lld] [LLD][COFF] Use EC symbol table for CHPE metadata (PR #120328)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 29 04:28:34 PST 2024


================
@@ -2688,6 +2693,21 @@ void Writer::prepareLoadConfig(SymbolTable &symtab, T *loadConfig) {
       loadConfig->DynamicValueRelocTableSection = relocSec->sectionIndex;
       loadConfig->DynamicValueRelocTableOffset =
           ctx.dynamicRelocs->getRVA() - relocSec->getRVA();
+
+      // On ARM64X, only the EC version of the load config contains
+      // CHPEMetadataPointer. Copy its value to the native load config.
+      if (!symtab.isEC() && ctx.hybridSymtab->loadConfigSize >=
----------------
mstorsjo wrote:

Thanks! Yes that's what I meant - currently they're only used in ARM64X contexts, but in principle, dynamic relocations could maybe be used elsewhere as well.

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


More information about the llvm-commits mailing list