aboutsummaryrefslogtreecommitdiff
path: root/AGENTS
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-18 08:30:39 +0000
committer_ov4 <ov4@ov4.org>2026-10-18 08:30:39 +0000
commit20a6c049f93e14e9c4faaa9d66e657732f86adb3 (patch)
tree9cc4ebe738971d89f6e43c6323c2a94ddf42f4f9 /AGENTS
parent14c03b7c26ff06835fca631eed6a3e308946321a (diff)
fix(driver): normalize MinGW unwind COMDATs before JIT linking
Associate symbol-less MinGW unwind sections with their code before graph construction, including objects loaded from runtime archives. Handle suffixed unwind sections in personality stubs and SEH table registration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'AGENTS')
-rw-r--r--AGENTS/ARCH.md16
1 files changed, 10 insertions, 6 deletions
diff --git a/AGENTS/ARCH.md b/AGENTS/ARCH.md
index eb55466..2408179 100644
--- a/AGENTS/ARCH.md
+++ b/AGENTS/ARCH.md
@@ -139,14 +139,18 @@ Driver behavior (`tools/driver/main.cc`):
the generic LLVM IR platform with EH-frame registration. macOS uses LLJIT's
unwind registration, selecting compact unwind or EH-frame per host capability.
Windows x86_64 keeps the GNU C++ runtime and `__gxx_personality_seh0` with a
- small in-process COFF adapter: per-graph `__ImageBase` shared by relocations
- and SEH registration, default backend liveness for `.pdata`, JITLink
+ small in-process COFF adapter: `MinGWCOFF.h` normalizes symbol-less MinGW
+ `.pdata$NAME`/`.xdata$NAME` COMDATs to associative COMDATs of `.text$NAME`
+ in private object-buffer copies before graph construction, including lazy
+ runtime archive members. Per-graph `__ImageBase` is shared by relocations
+ and SEH registration, with default backend liveness for `.pdata` and
+ associative code edges retaining the suffixed unwind sections. JITLink uses
pointer-jump stubs for external direct CALL/JMP PCRel32 references in user
- objects and `.xdata` personality references (shared per target; data references
- are preserved), and
+ objects and `.xdata`/`.xdata$NAME` personality references (shared per target;
+ data references are preserved), and
`RtlAddFunctionTable`/`RtlDeleteFunctionTable` via JITLink allocation actions
- covering teardown and link-failure cleanup, with table validation in the
- registration callback; registration failure blocks entry.
+ for `.pdata` and `.pdata$NAME`, covering teardown and link-failure cleanup,
+ with table validation in the registration callback; registration failure blocks entry.
The JIT builds its `ObjectLinkingLayer` through one file-local factory (COFF
flags stay format-conditional, SEH plugin installed before LLJIT ownership)
so Windows COFF does not fall back