[lld] [LLD][COFF] Emit ARM64X relocations for CHPE ExtraRFETable entries (PR #126713)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 13 05:55:39 PST 2025
================
@@ -2423,12 +2427,22 @@ void Writer::setECSymbols() {
offsetof(data_directory, Size),
symtab->edataEnd->getRVA() - symtab->edataStart->getRVA() +
symtab->edataEnd->getSize());
- if (hybridPdata.first)
+ if (hybridPdata.first) {
ctx.dynamicRelocs->set(
dataDirOffset64 + EXCEPTION_TABLE * sizeof(data_directory) +
offsetof(data_directory, Size),
hybridPdata.last->getRVA() - hybridPdata.first->getRVA() +
hybridPdata.last->getSize());
+ if (chpeSym) {
+ size_t size = 0;
+ if (pdata.first)
+ size = pdata.last->getRVA() - pdata.first->getRVA() +
+ pdata.last->getSize();
----------------
mstorsjo wrote:
Nitpick: I find this easier to read as `last->getRVA() + last->getSize() - first->getRVA()`.
https://github.com/llvm/llvm-project/pull/126713
More information about the llvm-commits
mailing list