vinc17
vinc17

Reputation: 3476

What is LD_RUNPATH?

A couple of answers mention the LD_RUNPATH environment variable:

but I couldn't find any description or official reference, including in the ld(1) and ld.so(8) Linux man pages. It seems that the goal is to have a lower precedence than LD_LIBRARY_PATH, particularly useful under Solaris, where LD_LIBRARY_PATH overrides everything.

A search on Google shows some discussions involving LD_RUNPATH, but nothing concrete. A search on Wikipedia is also unsuccessful. I also did some compilation/run tests with shared libraries under GNU/Linux and Solaris, but couldn't notice any effect.

So, what is this environment variable? Is there any official documentation?

Upvotes: 3

Views: 5956

Answers (3)

Armali
Armali

Reputation: 19375

There is no LD_RUNPATH. Most likely this is a typo of LD_RUN_PATH or DT_RUNPATH.

Regarding DT_RUNPATH, TechBlog says:

The DT_RUNPATH value is set with the linker options -rpath (or LD_RUN_PATH) and the –enable-new-dtags.

Upvotes: 4

P. Morel
P. Morel

Reputation: 86

Sorry, did not fully understand (or read enough :) ), in the ld(1) manual you have the answer: LD_RUN_PATH is used to initialise the run path if the -rpath option is not used.

Upvotes: 0

P. Morel
P. Morel

Reputation: 86

You may find interresting informations on GNU GCC pages or on Linux documentation project.

See:

http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html

Upvotes: -2

Related Questions