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

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 28 14:46:09 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:

Can we assume that `ctx.hybridSymtab` exists here? What if dynamic relocs were to be used on a regular architecture?

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


More information about the llvm-commits mailing list