This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Bug report: objc classes linked in wrong order


On Tue, May 30, 2000 at 07:47:02PM +0100, nicola@brainstorm.co.uk wrote:
> I could try making weak the module constructor
> 
>   _GLOBAL_.I..._.._.._egcs_20000501_libobjc_NXConstStr.mV7ccEc
> 
> in some way (is that what you are suggesting ?).

No.  In fact, that function should not even be public (normally),
since it is called from .ctors.

What should be public and weak is _OBJC_CLASS_NXConstantString.
That's the piece of data that (apparently) contains all of the
data relevant to the class.  If you make that weak, then the
reference to it from _OBJC_SYMBOLS will point to the strong version.

As long as __objc_exec_class is smart enough to recognize when
one class is being registered twice, and do nothing, you should
be fine.


r~

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]