RPATH for installed binaries ?

Thiago Macieira thiago at kde.org
Sun Feb 19 20:24:55 GMT 2006


Dirk Mueller wrote:
>For example they work inconsistently. They only apply to shared lib
> loading, not to loading via dlopen().

I can accept that it may work inconsistently, but the only example you 
gave is denied by the dlopen(2) man page:

[if the file name does not contain '/']  the dynamic  linker  searches  
for the library as follows (see ld.so(8) for further details):

o      (ELF only) If the executable file for the calling  program  con-
      tains  a  DT_RPATH  tag,  and does not contain a DT_RUNPATH tag,
      then the directories listed in the DT_RPATH tag are searched.

o      If the environment variable LD_LIBRARY_PATH is defined  to  con-
      tain  a  colon-separated  list  of  directories,  then these are
      searched.  (As a security measure this variable is  ignored  for
      set-user-ID and set-group-ID programs.)

o      (ELF  only)  If the executable file for the calling program con-
      tains a DT_RUNPATH tag, then the directories listed in that  tag
      are searched.

>> And do they affect RUNPATH too (not RPATH)?
>
>Since you mentioned RUNPATH, perhaps you should elaborate on the
>differences :)  AFAIK RUNPATH is the successor of RPATH, but has
> identical semantics.

The difference is what I listed above: RPATH is searched before 
LD_LIBRARY_PATH while RUNPATH is searched afterwards.

And the presence of RUNPATH makes the RPATH entries be ignored completely.

>> Do you have numbers for the slowing down? I'm not disputing that it
>> happens, I just wonder how much it can impact.
>
>No, feel free to do them yourself. The issue is that the ld.so.conf
> library cache is entirely circumvented, and for libs that are not in
> the rpath the ld.so falls back to statting around to see where the lib
> could come from.

That's what I thought. I was just wondering if you had the numbers.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

4. And æfter se scieppend ingelogode, he wrát "cenn", ac eala! se 
rihtendgesamnung andswarode "cenn: ne wát hú cennan 'eall'. Ástynt."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060219/61ad0dab/attachment.sig>


More information about the kde-core-devel mailing list