Bug 23820 – Undefined reference to RTInfoImpl

Status
NEW
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-04-03T22:39:55Z
Last change time
2024-12-13T19:28:09Z
Keywords
betterC, dll
Assigned to
No Owner
Creator
Richard (Rikki) Andrew Cattermole
Moved to GitHub: dmd#20256 →

Comments

Comment #0 by alphaglosined — 2023-04-03T22:39:55Z
This is an issue that I've had for a while that only occurs within dmd as of 2.102.0, works in ldc. Scenario: -betterC DLL, full D executable. Results in missing symbols during the executable linking such as: _D6object__T10RTInfoImplVAmA2i96i1063ZQBayG2m From what I can tell, dmd is emitting RTInfo at the type being compiled. Which of course may not exist. In this scenario and it would be better to initialize the template and emit it when required instead. The workaround for this at the user side (full D executable) is to create stubs: ```d version (DigitalMars) version = NeedStubs; version (NeedStubs) { static foreach (Stub; [ "_D6object__T10RTInfoImplVAmA2i96i1063ZQBayG2m", "_D6object__T10RTInfoImplVAmA2i136i87079ZQBcyG2m", "_D6object__T10RTInfoImplVAmA2i208i3560789ZQBeyG2m", "_D6object__T10RTInfoImplVAmA2i56i66ZQyyG2m", "_D6object__T10RTInfoImplVAmA2i264i6098517954ZQBhyG2m", "_D6object__T10RTInfoImplVAmA2i168i349524ZQBdyG2m", "_D6object__T10RTInfoImplVAmA2i152i305834ZQBdyG2m", ]) { mixin(() { return "extern(C) void " ~ Stub ~ "() { asm { naked; dl 0; dl 0;}\n}\n"; }()); } } ```
Comment #1 by robert.schadek — 2024-12-13T19:28:09Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20256 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB