public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@wasabisystems.com>
To: Antti Kerola <antti.kerola@uta.fi>
Cc: binutils@sources.redhat.com
Subject: Re: Lazy binding of virtual table entries?
Date: Mon, 08 Nov 2004 19:00:00 -0000	[thread overview]
Message-ID: <m3mzxsqi7p.fsf@gossamer.airs.com> (raw)
In-Reply-To: <6.0.3.0.0.20041108000619.0284d620@imap.uta.fi>

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

      reply	other threads:[~2004-11-08 19:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-07 22:12 Antti Kerola
2004-11-08 19:00 ` Ian Lance Taylor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3mzxsqi7p.fsf@gossamer.airs.com \
    --to=ian@wasabisystems.com \
    --cc=antti.kerola@uta.fi \
    --cc=binutils@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).