[lld] [LLD][COFF] Use EC symbol table for CHPE metadata (PR #120328)
Jacek Caban via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 29 04:16:33 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 >=
----------------
cjacek wrote:
We currently create dynamic relocations only when the target is ARM64X, so checking `hybridSymtab` and `dynamicRelocs` amounts to the same thing. In theory, this could change in the future if we add support for other dynamic relocation types. I'll update it to use a separate branch to avoid relying on this assumption, which should also make the code a bit cleaner.
https://github.com/llvm/llvm-project/pull/120328
More information about the llvm-commits
mailing list