From Yocto Project
Jump to: navigation, search


Project Background

The upstream prelink project was founded by Jakub Jelinek at Red Hat. The upstream project is primarily focused on self-hosted configurations and does not support prelinking a target filesystem in a cross-development environment.

This limitation is due to the prelink software requiring the runtime linker to be available in order to resolve linking dependencies.

The cross prelink patches began at MontaVista around 2003 in order to work around this limitation. The original patches added the ability to emulate a runtime linker, as well as enabled a sysroot option. Over time, this work was continued by MontaVista, Wind River and CodeSourcery. Unfortunately, while all of the patches had been made public in one fashion or another, there was no central location that gathered and offered to manage these changes. Starting with the Yocto Project we have decided to put together these patches and make them available as a single unit, with a clear upstream that will happily accept patches.

Upstream Prelink

The upstream prelink project is located at

For mailing lists, see:

For SVN access to the upstream tree, see: svn://

Yocto Project Cross-Prelink

See the page on the website for more information on this project.

Mark Hatle -- User:Mhatle is the project maintainer for the cross-prelink component of the Yocto Project.

Patch Submission

For Yocto-generic information on patch submission, see the Contribution Guidelines.

For cross-prelink specific information, see README.cross.

Git Archive Branches

The main branches of interest of the git archive are:

  • cross_prelink contains the cross-prelink sources.
  • cross_prelink_staging contains proposed changes for the cross-prelink sources.
  • master tracks the upstream prelink tree. Note that this may or may not be up to date.

Testing prelink/cross-prelink on Ubuntu

On recent Ubuntu versions, the default gcc passes -Wl,--as-needed to the linker by default (see here for more info). This will cause some prelink/cross-prelink tests to fail. This can be worked around by passing overrides in CC and CXX to make check:

$ make check CC='gcc -Wl,--no-as-needed' CXX='g++ -Wl,--no-as-needed'

On recent Ubuntu versions, the libraries are layed out according to the multiarch spec. This causes most cross-prelink tests to fail. This can be worked around by passing a library path to prelink-rtld:

$ make check LDD="../src/rtld/prelink-rtld --library-path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu"
Personal tools