If I had my way

Martin Nowak dawg at dawgfoto.de
Tue Dec 13 04:12:44 PST 2011


On Sat, 10 Dec 2011 22:32:17 +0100, Walter Bright  
<newshound2 at digitalmars.com> wrote:

> On 12/10/2011 12:53 PM, maarten van damme wrote:
>> Could also someone shed some light on creating shared library's on  
>> linux? there
>> was some news about -fPIC beeing fixed but no real confirmation.
>
> Turns out there was a bug where EBX was not set correctly when calling a  
> function that existed in a shared library. This bug was fixed. So we're  
> ready to try again at creating a shared library with dmd.
>

On x86-64 the PIC code is working fine, but there were some relocation  
issues left.
https://github.com/dawgfoto/dmd/commits/SharedElf

I'm looking into wiring things up with the runtime,
but it requires quite some changes.

One thing I don't have a good answer too is how to handle registration
of a shared library loaded during runtime. Apparently we don't want
to synchronize all threads whenever a library gets loaded/unloaded.

martin


More information about the Digitalmars-d mailing list