[lld] [lld][COFF] Support .pdata section on ARM64EC targets. (PR #72521)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 29 05:08:18 PST 2023
================
@@ -1665,10 +1689,15 @@ template <typename PEHeaderTy> void Writer::writeHeader() {
dir[RESOURCE_TABLE].RelativeVirtualAddress = rsrcSec->getRVA();
dir[RESOURCE_TABLE].Size = rsrcSec->getVirtualSize();
}
- if (firstPdata) {
- dir[EXCEPTION_TABLE].RelativeVirtualAddress = firstPdata->getRVA();
- dir[EXCEPTION_TABLE].Size =
- lastPdata->getRVA() + lastPdata->getSize() - firstPdata->getRVA();
+ Chunk *firstPdataChunk =
+ ctx.config.machine == ARM64EC ? firstHybridPdata : firstPdata;
+ if (firstPdataChunk) {
+ Chunk *lastPdataChunk =
+ ctx.config.machine == ARM64EC ? lastHybridPdata : lastPdata;
----------------
mstorsjo wrote:
Would it make this part of the code simpler, if you'd swap the roles of `firstPdata` and `firstHybridPdata`, having `firstPdata` point at the X64 unwind info, just like the data directory does, and `firstHybridPdata` point at the ARM64 unwind info?
https://github.com/llvm/llvm-project/pull/72521
More information about the llvm-commits
mailing list