From f1739f5cfde5c981dc073d056d15aceb75171f9e Mon Sep 17 00:00:00 2001 From: Alan Jowett Date: Wed, 6 May 2026 13:07:47 -0700 Subject: [PATCH] Fix ARM64 alignment for object type exports Mark ExEventObjectType and IoFileObjectType as DATA exports in Source.def. Without DATA, the import library generates function-style thunks that are only 4-byte aligned on ARM64, but the ARM64 LDR instruction for 8-byte loads requires 8-byte alignment, causing LNK2048 relocation errors. Consumers that reference these symbols without __declspec(dllimport) (e.g. via WDK headers) need /ALTERNATENAME linker flags to resolve the direct references against the __imp_ import symbols. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/Source.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Source.def b/src/Source.def index abd9bd8..c09998c 100644 --- a/src/Source.def +++ b/src/Source.def @@ -5,8 +5,8 @@ LIBRARY EXPORTS - ExEventObjectType - IoFileObjectType + ExEventObjectType DATA + IoFileObjectType DATA FwpmCalloutAdd0 FwpmCalloutDeleteByKey0