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]

Re: ELF prelinking (was: Linking speed for C++)


Hi,

On Thu, 31 May 2001, Jakub Jelinek wrote:
> I've spent last two weeks working on ELF prelinking.

Hurray.

> Today I've finally managed to get prelinked konqueror working

Hurray.

> (konqueror is
> IMHO a typical example of application which has zillions of shared libraries
> and spents an awful lot of time in the dynamic linker).

  (Indeed.)

> time DISPLAY= LD_LIBRARY_PATH=. ./konqueror
> real    0m0.510s
> prelinked konqueror:
> real    0m0.011s

Hurray.

> For prelinking, I need at least some minimal help from the static linker
> though.
> The minimal requirement is to reserve a few entries at the end of .dynamic
> section (or after .dynamic and before the next section (usually .sbss or
> .bss)), for shared libraries I need at least 3 ElfW(Dyn) slots (DT_CHECKSUM,
> DT_GNU_TIMESTAMP, DT_RELCOUNT resp. DT_RELACOUNT), for binaries I need at
> least 5 ElfW(Dyn) slots (DT_GNU_CONFLICT{,SZ}, DT_GNU_LIBLIST{,SZ},
> DT_REL{,A}COUNT). Do you think ld could do this (wasting 40 resp. 80 bytes
> (the latter for elf64) if not prelinking does not look like a killer)?

Couldn't this be done in the linker scripts?

> I'll post the source once I clean it up some more for people to comment on.

Looking (eagerly) forward ;-)

May be, those -Bsymbolic abominations are needed.


Ciao,
Michael.


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