gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple _OBJC_Module in the same shared library/framework, not so g


From: Nat!
Subject: Re: Multiple _OBJC_Module in the same shared library/framework, not so good
Date: Wed, 4 Jan 2012 11:36:33 +0100

Am 04.01.2012 um 00:25 schrieb David Chisnall:

> Hi Nat,
> 
Hi David,


> This is, unfortunately, a limitation imposed on us by the old GCC ABI.

That reads to me as "inevitable", which I can't agree with, due to this being 
IMO a linker issue.

>  
> 
> With the non-fragile ABI (and clang's transitional ABI), classes all export a 
> public symbol, so it is possible for us to initialise the isa pointer as a 
> weak reference to the public symbol for the NSConstantString class so that 
> the fixup in the runtime becomes redundant.  This is done in clang r147493 
> and your test case now passes for me.  It should work as long as GNUstep-base 
> is compiled with clang.  If it was not, then the weak symbol will be resolved 
> to null at link time and you will see the same crash.

Seems to have been reverted already. The quick fix to hardcode NXConstantString 
is really bad, because it breaks -fconstant-string-class.

Anway, I still think the proper solution would be to improve the linker to 
coalesce multiple _OBJC_Module into one. This would have also the side benefits 
of a bit faster startup time and a bit smaller object files. 

I hope the gcc compiler isn't abandoned now by GNU/GNUstep ? If fixes are now 
done only in clang and not in gcc, that would implicate it to me.

Ciao
   Nat!

> 
> David
> 
> P.S.  'irregardless' still isn't a word...
Consider it "modern" :)

------------------------------------------------------------
It's great when you have a tool to make programming 
easier, but you still must understand what it does 
or you're just replacing one set of problems with 
another set of more subtle problems. -- Raymond Chen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]