newest collect2 patch
Andrey Slepuhin
pooh@msu.ru
Wed Jan 28 03:19:00 GMT 1998
On 28-Jan-98 Jeffrey A Law wrote:
> In message <XFMail.980127201411.pooh@msu.ru>you write:
> > this header. The problem is because in the second
> > case typeinfo nodes should be generated using ".lcomm"
> > assembler directive instead of ".comm", i.e. they
> > should not be global.
> > If this problem will be fixed, we really do not need
> > any checks for typeinfo nodes in collect2.
> Actually I think these need to be global & exported.
> (assuming that we're moving to an export list for libgcc).
Indeed, typeinfo problem doesn't refer to libgcc. For example, imagine
that I have generic class my_exception; this class is never instantiated
itself. But inherited classes are agressively used both in program
modules and in shared objects. In every module where I use
a class which inherits my_exception, typeinfo node for my_exception
is instantiated. As a result I get duplicated symbols. If I
disable exporting symbols for typeinfo nodes in collect2
(to avoid warnings about duplicated symbols), I get undefined
typeinfo nodes for libstdc++ classes which are declared
using "#pragma interface" directive.
Of course, there are no problems if I don't use shared libraries,
but I do this...
Andrey.
More information about the Gcc
mailing list