Linux dmd has a core.runtime.Runtime.loadLibrary linkage problem

Rachel Wilson rachel at vectle.com
Sun Oct 11 10:20:11 UTC 2026


On Saturday, 10 October 2026 at 17:26:10 UTC, Rambutan wrote:
> This is a bug. I started a discussion.
> https://github.com/dlang/dmd/discussions/24003

those symbols only exist in the shared druntime build. 
rt_loadLibrary and rt_unloadLibrary are defined in druntime's 
rt/sections_elf_shared.d inside a version(Shared) block, and the 
static libphobos2.a that dmd ships is built without it, so the 
linker has nothing to resolve. thats why jordi's 
-defaultlib=libphobos2.so workaround fixes the link, that library 
is built with the shared path enabled. gdc compiles its druntime 
with those functions included, which is why you never hit this 
there. so yeah, it looks like a real packaging bug in dmd's 
static druntime, not your code.


More information about the Digitalmars-d-learn mailing list