Skip to content

[SYMBOLS] data.asm mangled names for 0x00DF33E8 and 0x00DF3D18 no longer match the compiler, breaking the link #361

Closed

Description

@Sebauxs

Hi! I'm new here and just set up OpenSHC on Linux (wine) to start contributing. To check my setup I built the DLL with all the reimplementations compiled in, and the link failed on two globals. I dug into it a bit, and it looks like a regression from the recent Ghidra exports. Details below.

Summary

The last Ghidra exports regenerated src/symbols/data.asm with mangled names for two globals that differ from what MSVC 2005 emits for the declarations in src/OpenSHC/Globals/. With every reimplementation compiled in (git ls-files 'src/OpenSHC/*.cpp' > cmake/openshc-sources.txt.local), linking OpenSHC.dll fails:

TicksStartCounter.cpp.obj : error LNK2001: unresolved external symbol "public: static union _LARGE_INTEGER StructResolver::Extern<union _LARGE_INTEGER,14627816>::instance" (?instance@?$Extern@T_LARGE_INTEGER@@$0NPDDOI@@StructResolver@@2T_LARGE_INTEGER@@A)
TicksSinceCounterStart.cpp.obj : error LNK2001: unresolved external symbol "public: static union _LARGE_INTEGER StructResolver::Extern<union _LARGE_INTEGER,14627816>::instance" (?instance@?$Extern@T_LARGE_INTEGER@@$0NPDDOI@@StructResolver@@2T_LARGE_INTEGER@@A)
initializeDirectPlayAndCreateOrJoinSession.cpp.obj : error LNK2001: unresolved external symbol "public: static struct IDirectPlay4 * StructResolver::Extern<struct IDirectPlay4 *,14630168>::instance" (?instance@?$Extern@PAUIDirectPlay4@@$0NPDNBI@@StructResolver@@2PAUIDirectPlay4@@A)
DLL\OpenSHC.dll : fatal error LNK1120: 2 unresolved externals

CI does not see this because the committed cmake/openshc-sources.txt is empty.

Details

Global Declared type (header) Compiler emits data.asm has Introduced in
DAT_PerformanceCounterFrequency 0x00DF33E8 _LARGE_INTEGER T_LARGE_INTEGER (union) U_LARGE_INTEGER (struct) 6306080 (2026-11-05)
DPLAY_InterfacePointer 0x00DF3D18 IDirectPlay4* PAUIDirectPlay4@@ (global namespace) PAUIDirectPlay4@dplay@@ (namespace dplay) 7c6bb9e (2026-11-04)
  1. _LARGE_INTEGER: before 6306080 the header used LARGE_INTEGER and data.asm had the correct T_ (union) mangling. The export renamed the type to _LARGE_INTEGER and now mangles it as a struct. In winnt.h _LARGE_INTEGER is a union, so the Ghidra type is probably defined as a struct.
  2. IDirectPlay4: 7c6bb9e changed the header from IDirectPlay4A** to IDirectPlay4* (the old data.asm entry was PAPAUIDirectPlay4@@). The new entry places the type in a dplay namespace, probably taken from the Ghidra category/path of dplay.h. The SDK declares IDirectPlay4 at global scope.

Affected reimplementations (both are marked 100% in the status file):

  • src/OpenSHC/Rendering/TicksStartCounter.cpp (0x0046CF10)
  • src/OpenSHC/UI/Helpers/TicksSinceCounterStart.cpp (0x0046CF90)
  • src/OpenSHC/Synchrony/GameSynchronyState/initializeDirectPlayAndCreateOrJoinSession.cpp (0x0047DB10)

Expected

data.asm should contain:

?instance@?$Extern@T_LARGE_INTEGER@@$0NPDDOI@@StructResolver@@2T_LARGE_INTEGER@@A EQU 00DF33E8h
?instance@?$Extern@PAUIDirectPlay4@@$0NPDNBI@@StructResolver@@2PAUIDirectPlay4@@A EQU 00DF3D18h

(plus the matching PUBLIC lines). Since data.asm is generated, I think the right fix is in the Ghidra data types (make _LARGE_INTEGER a union, keep IDirectPlay4 out of a namespace) or in the exporter's mangling, not a hand edit.

Suggestion

A CI job that builds with all of src/OpenSHC/**/*.cpp (e.g. via tools/reimplementation-helper/batch/build_parallel.py) would catch these regressions, and also cases like clearModalDialog2to6.cpp after 8125c61 (fixed in #348).

Environment

Linux, wine 10.0, MSVC1400-SP1 at c50661b, OpenSHC at 1c29459 (main, 2026-11-07).

Activity

  1. TheRedDaemon commented on Nov 8, 2026

    @TheRedDaemon
    Contributor

    Hi @gynt, can you check this?

  2. gynt commented on Nov 9, 2026

    @gynt
    Contributor

    Thanks for reporting! @Sebauxs
    Looking forward to your first contribution! Let us know if we can help out.
    A fix should be up soon

  3. gynt commented on Nov 9, 2026

    @gynt
    Contributor

    Unfortunately build times are too slow, and pushes too frequent currently to make GitHub CI run full builds after each push to main. You are free to submit PR's to repair broken changes.

  4. added a commit that references this issue on Nov 10, 2026
    511b8d0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions