Bug 406 – std.loader is broken on linux

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-10-07T14:12:00Z
Last change time
2014-02-15T13:22:15Z
Keywords
link-failure, patch
Assigned to
bugzilla
Creator
h3r3tic

Comments

Comment #0 by h3r3tic — 2006-10-07T14:12:50Z
There are three problems with std.loader: 1. It's not compiled into libphobos.a 2. When compiled-in, gcc complains about a duplicate RTLD_NOW symbol, the second instance exists in std.c.linux.linux. 3. When the conflicting symbols are resolved (e.g. by replacing the RTLD_NOW usage in std.loader to its numeric value, 0x00002), lib loading doesn't work in linux because of the line 339 in loader.d: ExeModuleInfo mi = s_modules[moduleName]; it should be changed to: ExeModuleInfo* mi_p = moduleName in s_modules; ExeModuleInfo mi = mi_p is null ? null : *mi_p;
Comment #1 by bugzilla — 2007-07-30T15:46:29Z
Fixed DMD 1.019 and 2.003