From ArchWiki
Jump to: navigation, search

Gnome-colors-add-files-to-archive.pngThis article is being considered for archiving.Gnome-colors-add-files-to-archive.png

Reason: Removed from AUR [1] (Discuss in Talk:Prelink#)
Warning: Using prelink may corrupt system libraries, resulting in an unbootable system: FS#54820. Performance benefits are neglible. [2] [3]

Most programs require libraries to function. Libraries can be integrated into a program once, by a linker, when it is compiled (static linking) or they can be integrated when the program is run by a loader, (dynamic linking). Dynamic linking has advantages in code size and management, but every time a program is run, the loader needs to find the relevant libraries. Because the libraries can move around in memory, this causes a performance penalty, and the more libraries that need to be resolved, the greater the penalty. Prelink reduces this penalty by using the system's dynamic linker to reversibly perform this linking in advance ("prelinking" the executable file) by relocating. Afterward, the program only needs to spend time finding the relevant libraries on being run if, for some reason (perhaps an upgrade), the libraries have changed since being prelinked.


Install the prelinkAUR[broken link: package not found] package.


All settings are in /etc/prelink.conf.

Note: Some proprietary binaries will crash with prelink (such as Flash, Nvidia proprietary driver). You can add these to the exclude list in /etc/prelink.conf.



The following command prelinks all the binaries in the directories given by /etc/prelink.conf:

# prelink -amR
Warning: It has been observed that if you are low on disk space and you prelink your entire system then there is a possibility that your binaries may be truncated, the result being a broken install. Use the file or readelf command to check the state of a binary file. Alternatively, check the amount of free space on your harddrive ahead of time with df -h.

Exclude list

Taken from the discussion page:

# Flash Player Plugin
-b /usr/lib/mozilla/plugins/

-b /usr/lib/*
-b /usr/lib32/*
-b //usr/lib/*
-b //usr/lib32/*
-b /usr/lib32/vdpau/
-b /usr/lib/vdpau/
-b /usr/lib/xorg/modules/drivers/
-b /usr/lib/xorg/modules/extensions/*
-b /usr/lib/libnvidia-*
-b /usr/lib32/libnvidia-*

# Catalyst
-b /usr/lib/libati*
-b /usr/lib/fglrx*
-b /usr/lib/libAMDXvBA*
-b /usr/lib/*
-b /usr/lib/libfglrx*
-b /usr/lib/xorg/modules/dri/
-b /usr/lib/xorg/modules/drivers/
-b /usr/lib/xorg/modules/extensions/fglrx/
-b /usr/lib/xorg/modules/linux/
-b /usr/lib/xorg/modules/extensions/

Removing prelink

Remove prelinking from all binaries:

# prelink -au

Daily cron job

This is recommended (and included in other distros packages) as it has to be done in order to get speed benefits from updates.

if [ -x /usr/bin/prelink ]; then
  /usr/bin/prelink -amR >/dev/null 2>&1

and give it the necessary ownership and permissions:

# chmod 755 /etc/cron.daily/prelink

Alternatively, install the prelink-systemdAUR package for a daily systemd timer with the same effect as the above cron script.


KDE knows about prelinking and it will start faster if you tell it you have it. It is best to stick this in where all the users can use it.


and give it the necessary ownership and permissions:

# chmod 755 /etc/profile.d/


segfault, kernel panic

In case you suddenly get a boot failure with errors like segfault, kernel panic, it's a very good chance the prelink has caused this.

Follow this forum in order to restore the functionality of the system.

See also