This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [I don't think it's off-topic at all] Linking speed for C++
- To: hjl at lucon dot org (H . J . Lu)
- Subject: Re: [I don't think it's off-topic at all] Linking speed for C++
- From: Joe Buck <jbuck at synopsys dot COM>
- Date: Wed, 30 May 2001 09:25:49 -0700 (PDT)
- Cc: dan at cgsoftware dot com (Daniel Berlin), matz at kde dot org (Michael Matz), rth at redhat dot com (Richard Henderson), jbuck at synopsys dot COM (Joe Buck), gcc at gcc dot gnu dot org
H.J. Lu writes:
> You can write an ABI in C++ in such a way that -Bsymbolic will work
> just fine.
This echos a thought that I had last night. With a minor change, Qt/KDE
could use -Bsymbolic.
The reason that the first attempt failed is that we have a static data
member that is accessed both in the shared library and in code that links
to this shared library. Since Qt and KDE are reasonably designed
libraries, they don't give public access to important data members, which
means that there must be inline functions that access those members.
So the next thing to try (Michael Matz, or another interested party) is
to see if you can make any private data members effectively a secret
of the library at object code level. This means that any inline
functions that access those objects should be moved to a .cxx file
that belongs to the same shared library as the definition of the object.
Then, I believe that -Bsymbolic will work (well, until you find the
next problem).