Technical Details
Prelink is a program that modifies ELF shared libraries and ELF dynamically linked binaries in such a way that the time needed for the dynamic linker to perform relocations at startup significantly decreases. Due to fewer relocations, the run-time memory consumption decreases as well (especially the number of unshareable pages). The prelinking information is only used at startup time if none of the dependent libraries have changed since prelinking; otherwise programs are relocated normally.
Prelink first collects ELF binaries to be prelinked and all the ELF shared libraries they depend on. Then it assigns a unique virtual address space slot to each library and relinks the shared library to that base address. When the dynamic linker attempts to load such a library, unless that virtual address space slot is already occupied, it maps the library into the given slot. After this is done, prelink, with the help of dynamic linker, resolves all relocations in the binary or library against its dependent libraries and stores the relocations into the ELF object.
It also stores a list of all dependent libraries together with their checksums into the binary or library. For binaries, it also computes a list conflicts (relocations that resolve differently in the binary’s symbol search scope than in the smaller search scope in which the dependent library was resolved) and stores it into a special ELF section.
At runtime, the dynamic linker first checks whether all dependent libraries were successfully mapped into their designated address space slots, and whether they have not changed since the prelinking was done. If all checks are successful, the dynamic linker just replays the list of conflicts (which is usually significantly shorter than total number of relocations) instead of relocating each library.
To enable Prelink in Ubuntu, you have to enable the "Universe" repository. Before using Prelink do google about Prelink and do your research before trying it out.
How to enable prelink
- Activate Ubuntu universe sources. Goto System>Administration>Software Sources. Check the second box "Community-maintained Open source software (universe)". Reload the softwares list after this (prompted automatically).
- Now, use apt-get or synaptic to install prelink. (Type sudo apt-get install prelink in gnome-terminal)
- Open /etc/default/prelink file with your favorite editor, as sudo/root, e.g. (sudo gedit /etc/default/prelink)
- Change the line PRELINKING=unknown to PRELINKING=yes
- Adjust the other options if you know what the heck you're doing. Defaults work well.
- To start the first prelink type in sudo /etc/cron.daily/prelink. This would be the longest one to execute. Took about 2 minutes on my machine. So, be patient. In the future, prelink performs a quick prelink (a less-than-1-minute procedure on most systems) daily, usually at midnight. Every 14 days, or whatever you changed it to be, a full prelink will run.
Stopping Prelinking
In case you do not want to use Prelink anymore, maybe due to some problem etc., follow these steps.
- Change step 4, above, from PRELINKING=yes to PRELINKING=unknown
- Rerun step 6.
Hollanda yurtdışı kargo
ReplyDeleteİrlanda yurtdışı kargo
İspanya yurtdışı kargo
İtalya yurtdışı kargo
Letonya yurtdışı kargo
VJSGC
Yunanistan yurtdışı kargo
ReplyDeleteAfganistan yurtdışı kargo
Amerika Birleşik Devletleri yurtdışı kargo
Amerika Samoası yurtdışı kargo
Angola yurtdışı kargo
WBQH6
salt likit
ReplyDeletesalt likit
dr mood likit
big boss likit
dl likit
dark likit
F15AT
Thanks for sharing.
ReplyDeletealso, check Linux Classes in Pune