Rpath (linking)

Rpath (linking)

:"For information on rPath, Inc. please see rPath".

rpath is a term in computer science which refers to a runtime search path hard-coded in an executable file or library, used during dynamic linking to find the libraries and the executable file or library requires. It is inserted in the executable or library at link time.

Specifically it encodes a path to shared libraries into the header of an executable (or another shared library). This RPATH header value (so named in the ELF header standards) may either override or supplement the system default dynamic linking search path (as defined in "/etc/ld.so.conf" on Linux systems ... for example).

It can be thought of as a compile-time alternative to the LD_LIBRARY_PATH environment setting. While LD_LIBRARY_PATH would have to be properly set in the environment of any process attempting to run a given program; the RPATH setting is compiled into that program's headers.

The primary disadvantage of using RPATH is that it overrides the LD_LIBRARY_PATH settings which makes things like running a precompiled binary out of a user's home directory or some other non-default location difficult or impossible. Use of RPATH also makes it difficult, if not impossible, to upgrade libraries without forcing a reinstallation of all the software dependent on (even the older versions of) the libraries (see [http://people.debian.org/~che/personal/rpath-considered-harmful RPATH considered harmful] ).

External links

* [http://www.the-martins.org/index.php?name=Sections&req=viewarticle&artid=6&allpages=1 Soft Intro to rpath]
* [http://wiki.debian.org/RpathIssue Debian Wiki page about the use of RPATH]
* [http://sourceware.org/autobook/autobook/autobook_88.html Autobook section containing brief discussion of rpath]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Rpath — or rPath may refer to:*rpath (linking) *rPath, a company based in North Carolina …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”