Bug 10440 – shared library on osx: worked in 2.062, fails in 2.063 / 2.063.2
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-21T20:05:00Z
Last change time
2013-07-06T18:13:25Z
Assigned to
nobody
Creator
thelastmammoth
Comments
Comment #0 by thelastmammoth — 2013-06-21T20:05:17Z
--foo.d
module foo;
extern(C) void foo1(){}
--main.d
module main;
pragma(lib,"foo");
extern(C) void foo1();
void main(){foo1;}
dmd -oflibfoo.dylib -shared foo.d;
dmd -L-L. main.d
./main
--output:
2.062:OK
2.063(and 2.063.2):NG
gdb ./main
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
0x00000001000184fc in sections_osx_onAddImage ()
Comment #1 by maxim — 2013-06-21T22:41:27Z
I noticed that shared libraries don't work in similar way in linux too, approximately after 2.063 release. This is quite sad, because this is the way dynamic linking was working in linux since 2011 autumn (or earlier).