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


[Forgot to post to this list.]

> > I did not even know that 'constructor priorities' exist - I think this
> > would certainly be the best solution.
>
> They're not applicable across different shared libraries.

I don't know much about the subject, but by looking at the code and info I
had been pointed to (thanks nickc) I have the impression you are right,
constructor priorities don't seem to be useful in this context.

Anybody has any other idea about of how to have the NXConstantString class
from a shared library to be linked instead of the NXConstantString from a
shared libobjc when linking both libraries ?

Otherwise, we could use the trick I am using on my system, with the
function etc (see previous post) - it works quite happily.

If anybody can suggest a better alternative strategy, I am willing to
implement it (try implementing it) myself - otherwise please consider
using the trick - it's not so dirty after all.

The only other solution I can think of is simply not to compile in
NXConstantString neither in the static nor in the shared objective-C
runtime library.  This would be clean, but would also mean that objc
programs not linked with a library providing an implementation of
NXConstantString would not run at all.

-

I have been notified by the FSF that my copyright assignment for GCC has
been registered, so when gcc experienced people find some time to have a
look at the patches to build a shared libobjc (the preliminary to all this
discussion), that would be nice.

Thanks to anyone for help and suggestions, really helpful.



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