Lazy binding of virtual table entries?
Antti Kerola
antti.kerola@uta.fi
Sun Nov 7 22:12:00 GMT 2004
We have problems with slow application startup.
We have a rather large application, about 2 million lines of code, in about
80 shared libraries.
I have found out with LD_DEBUG that relocation of virtual table entries in
the shared libraries takes
place at the start up. This is now taking several seconds. According to
LD_DEBUG, all the
other function bindings are performed lazily.
- Is there a way to bind also the virtual table entries lazily?
- Alternatively, is there a way to prelink the executable so that the
virtual table entries
are resolved at link time without linking the whole app statically to one
huge binary?
We are using Solaris 2.8 on Sparc with gcc 3.3.2 configured for gnu ld and
gnu as.
Our binutils version is 2.13.2.1. We are prepared to consider updating our
tool set to
resolve this problem, though.
We are compiling with -fPIC. There are no other switches affecting code
generation.
There is some background information below
Each module in a library typically defines a new class which is derived
from one of our
base classes. Base classes may have almost 100 methods so we end up having
a virtual table referencing to these base class methods in each application
module.
The executable has no objects of its own. It is just a bunch of shared
libraries linked together.
Antti
More information about the Binutils
mailing list