This is the mail archive of the 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: [I don't think it's off-topic at all] Linking speed for C++

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).

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