On Wed, 30 Nov 2011 09:19:59 +0100, Walter Bright <newshou...@digitalmars.com> wrote:

On 11/29/2011 11:46 PM, Jacob Carlborg wrote:
I agree. The shared library problem is blocked by DMD not being able to
correctly generate PIC.

The compiler does correctly generate PIC code on Linux. The problem is nobody has figured out the details of making Phobos/Druntime a shared library.

I.e. there's more to creating a shared library than throwing -fPIC.

I just had a look at creating shared libraries yesterday.
The dynamic loader was complaining about some unsupported
relocations (R_X86_64_32 with fPIC).

What are the known remaining issues?

I was also wondering whether using the gc_proxy is the best decision for Windows.
On POSIX the GC symbols can be left undefined in the shared library
and are resolved by the dynamic loader.
The module infos could be added to a global list during _init and
removed during _fini. This approach works for runtime loading as well
as for linking to shared libs.

martin

Reply via email to