Bug 10255 – When creating lib files, dmd no longer splits module into multiple obj files
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2013-06-03T11:25:00Z
Last change time
2015-06-09T05:11:49Z
Assigned to
nobody
Creator
bugzilla
Comments
Comment #0 by bugzilla — 2013-06-03T11:25:29Z
Given:
----- foo.d --------
void foo1() { }
void foo2() { }
--------------------
and compiling with:
dmd -lib foo.d
lib -l foo.lib
will create the .lst file:
-------------------
Publics by name module
_D3foo12__ModuleInfoZ foo
_D3foo15__unittest_failFiZv foo
_D3foo4foo1FZv foo
_D3foo4foo2FZv foo
_D3foo7__arrayZ foo
_D3foo8__assertFiZv foo
Publics by module
foo
_D3foo12__ModuleInfoZ _D3foo15__unittest_failFiZv
_D3foo4foo1FZv _D3foo4foo2FZv
_D3foo7__arrayZ _D3foo8__assertFiZv
---------------------
showing that they are all put in one module. However,
dmd -c -multiobj foo.d
will correctly create multiple .obj files.
Comment #1 by r.sagitario — 2013-06-11T23:58:05Z
It seems there are actually multiple object files with the same name in the library which are merged in the list file. If you extract a module it only contains some of the listed symbols, not all. Opening the lib in IDA also reveals multiple files with the same name.