pre-linking - was Re: Performance shock (oops follow-up)

paul cooke paul.cooke100 at blueyonder.co.uk
Sun Apr 24 20:55:42 UTC 2005


On Sunday 24 April 2005 20:45, Ed Sutherland wrote:
> Your point about pre-linking applications for increased speed was
> intriguing. What is pre-linking?

http://ubuntuforums.org/archive/index.php/t-1971.html
gives you a howto for Ubuntu

http://www.crast.us/james/articles/prelink.php

| What is Prelinking?
|Prelinking is a process that allows you to speed up the process of dynamic
|linking. What it does is, through a process of magic that is incredibly
|complex, but basically it speeds up the relocation process, in loading shared
|libraries.. by setting preferred load addresses.   
|
|What is he talking about, you ask? Well, here's how it goes. Dynamically
|linked libraries (often referred to as DSO's or in the windows world DLLs)
|are libraries which are loaded at runtime. The advantage of shared libraries
|versus static libraries is, that it reduces the size of executables, since
|each program doesn't need its libraries built in, but will dynamically locate
|and use it at run time. This adds some overhead, because the address space of
|the library, instead of being known in advance, has to be mapped at runtime.
|Another advantage of shared libraries is that due to the magic of
|copy-on-write, you can save memory when you have multiple programs sharing
|the same library (though it's not as simple as that.. it is pretty
|complicated)          
|
|Pre-linking sets preferred address space for the libraries to be loaded at.
|Note they are _preferred_ spaces, and if that address space is not available,
|then it will use relocation to load it dynamically.. hence pre-linking is not
|100% foolproof.    






More information about the ubuntu-users mailing list