[lld] [lld][COFF] Support .pdata section on ARM64EC targets. (PR #72521)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 4 13:47:05 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:

Ok, fair enough, good that you've considered both alternatives here, I take your word for it that this is the best compromise for it!

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


More information about the llvm-commits mailing list