RTTI problem in egcs 1.1

figueroa@apple.com figueroa@apple.com
Tue Mar 2 00:25:00 GMT 1999


We are porting egcs 1.1 to Mac OS X Server.  It's working quite well, but we
have a problem that is serious for us: we can't in general put code generated by
our egcs-based C++ compiler into shared libraries on Mac OS X Server.  The
reason is that egcs tries to put RTTI stuff into the common section.  Because of
the way shared libraries work on Mac OS X Server, these must not have any
symbols in the common section.

We are trying to figure out a way to force RTTI stuff to be defined exactly once.
Certainly the lack of documentation on how all this is implemented doesn't
help, but our thought is that perhaps we could try to determine whether the
vtable for a given class will be actually generated in a given .o file, and if so,
then define the RTTI stuff for that class in that same .o file.  Alternatively, we
could generate RTTI stuff in every file that references it, but make it static so it's
not multiply defined.

Your comments or suggestions on what we should do would be greatly
appreciated.



cc: figueroa


More information about the Gcc-bugs mailing list