[Gllug] Apple

Nix nix at esperi.org.uk
Fri Jan 16 20:05:51 UTC 2004


On Fri, 16 Jan 2004, Doug Winter said:
> On Fri 16 Jan Tethys wrote:
>> >You save about 40,000 relocations with OOo-1.1, and about half of the
>> >startup time. (Writable page count will fall considerably as well, but
>> >I've not had a look to see how much.)
>> 
>> Just curious... how can you do relocations in advance unelss you know
>> where it's going to be loaded (which presumably, you don't). Without a
>> Windows-like scheme where programs are linked to be loaded at a given
>> location (and hence only need relocation if that location is unavailable),
>> then I don't see how you can reduce load time relocations.
> 
> AIUI prelinking works exactly like that :)  Libraries are assigned a
> preferred address, and only relinked if those addresses are unavailable.

Quite so.

This means both that prelinking is done over the *whole set* of binaries
and their DT_NEEDED libraries, and that newly built or relinked
libraries will require a rerun if they are to benefit, and that
libraries that don't bother to declare their DT_NEEDEDs but instead rely
on their caller loading or DT_NEEDing the right library also break it.

(*-config scripts, pkg-config scripts, and such things are very much at
fault here. GNOME 1 and perhaps GNOME 2 as well --- I've not checked ---
was rife with this, both with required DT_NEEDEDs not being specified
and with unnecessary ones thus being specified in all callers of such
libraries, making upgrades hellish.)

I wrote this rather ugly and kludgy script to report on unresolved
symbols defined by an ELF object and not satisfied by its DT_NEEDED
dependencies. It can be quite useful at times.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: missing-symbols
Type: application/x-perl
Size: 2504 bytes
Desc: perl script to identify symbols not satisfied by an	object's DT_NEEDEDs
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20040116/81fe5823/attachment.bin>
-------------- next part --------------

-- 
`note to the crown prosecution service: Machine guns dont have a
 'stun' setting.' --- mjw
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list