Shared Libraries [was Re: D 1.076 and 2.061 release]

Walter Bright newshound2 at digitalmars.com
Mon Jan 7 00:04:36 PST 2013


On 1/6/2013 11:51 PM, Jacob Carlborg wrote:
> On 2013-01-07 00:19, Walter Bright wrote:
>
>> I have fixed every single PIC implementation compiler problem that has
>> been brought to my attention. If there are others, I am not aware of
>> them. Please let me know the bugzilla issue numbers for any I have missed.
>
> I know you have. The problem is that there might be necessary to do some changes
> to the compiler. That doesn't mean there is a bug.

I'm sorry, but I can't do anything with that statement.


>> The OS X TLS implementation is all done in druntime.
>
> Not 100%. I'm thinking of the __tls_get_addr function which the compiler calls:
>
> https://github.com/D-Programming-Language/druntime/blob/master/src/core/thread.d#L4549

Yes, it defers it all to druntime by calling a druntime function.


> That function needs to know which image the given address belongs to. I think
> that the compiler needs to supply that, in addition to the address, but I'm not
> sure. If it does it requires a change in the compiler.
>
> I can add this to bugzilla.

Please nail down what is necessary first. (BTW, I don't know how the compiler 
can tell what image an address comes from. Remember, shared libraries are loaded 
at runtime, not compile time.)


>> Nevertheless, this does not impact Linux nor FreeBSD.
>
> Mac OS X is my main platform. It's natural that I try to get it to work there
> first.

No prob. I'll be happy to make compiler mods as necessary, once the exact 
problems are identified.



More information about the Digitalmars-d-announce mailing list