Re: On the cost of libraries
- From: Alex Larsson <alexl redhat com>
- To: Maciej Stachowiak <mjs noisehavoc org>
- Cc: <gnome-hackers gnome org>
- Subject: Re: On the cost of libraries
- Date: Sat, 1 Sep 2001 21:07:26 -0400 (EDT)
On Sat, 1 Sep 2001, Maciej Stachowiak wrote:
> On 01Sep2001 05:09PM (-0400), Alex Larsson wrote:
> >
> > No app will use all the symbols in the library though, and the
> > measurements I made are worst case (all symbols are found in the last
> > library). In reality most symbols referenced are probably in the lower
> > layers (fan-out effect as higher level functions call lower lever), and
> > lower level libraries are (hopefully) linked earlier.
> >
>
> Actually, lower-level libraries are typically later on the link line
> so they can resolve symbols in the higher-level libraries.
>
> > Note that this only discussed one aspect of libraries, the splitting
> > libraries aspect. Libraries do have other costs too, such as paging in
> > code and fixups. Most of the fixup cost can be fixed by using ELF
> > prelinking, and page-in costs could be lowered with a grope-like tool.
>
> So how come prelinking doesn't help with the symbol lookup cost? You
> would think a prelinked binary could know what symbol is in what
> shared library, and at what offset, assuming none of the libraries
> have changed since the prelinking was done.
Reading http://gcc.gnu.org/ml/gcc/2001-05/msg01670.html it seems that
prelinking would probably help here yes.
/ Alex
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]