This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Lazy binding of virtual table entries?


Antti Kerola <antti.kerola@uta.fi> writes:

> 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?

No.  I can't think of any way to do that without making virtual
function calls less efficient at runtime.

> - 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?

GNU/Linux has a prelinker which can do this.  But the dynamic linker
has to recognize the prelinking, and presumably the Solaris dynamic
linker won't recognize what the GNU/Linux prelinker does.  I don't
know whether Sun provides any similar prelinking functionality for
Solaris.

Ian


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