Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.system > #485

Re: rpath for library loading

From Rainer Weikusat <rweikusat@mssgmbh.com>
Newsgroups comp.os.linux.development.system
Subject Re: rpath for library loading
Date 2012-12-17 15:03 +0000
Message-ID <87hank201l.fsf@sapphire.mobileactivedefense.com> (permalink)
References <kamm8q$rc7$1@online.de> <8738z5t0wl.fsf@araminta.anjou.terraraq.org.uk> <kan3ar$4me$1@online.de>

Show all headers | View raw


Philipp Kraus <philipp.kraus@flashpixx.de> writes:
> On 2012-12-17 11:42:50 +0100, Richard Kettlewell said:

[...]

>> An rpath of . means it looks in the current directory at the time of
>> execution, not in the same location as the object containing the rpath.
>
> That's bad. Can I add a flag that the rpath should be relative to the other
> DLL?

,----
| RPATH TOKEN EXPANSION
|        The runtime linker provides a number of tokens that can be used
|        in an rpath specification (DT_RPATH or DT_RUNPATH).
| 
|        $ORIGIN
|               ld.so understands the string $ORIGIN (or equivalently
|               ${ORIGIN}) in an rpath specification to mean the
|               directory containing the application executable. Thus,
|               an application located in somedir/app could be compiled
|               with gcc -Wl,-rpath,'$ORIGIN/../lib' so that it finds an
|               associated shared library in somedir/lib no matter where
|               somedir is located in the directory hierarchy.
`---- [ld.so(8)]

BTW, a 'shared object' is something very much different than a
'dynamic link libray' which often isn't/ can't be shared dynamically
because it doesn't use position-independent code.

Back to comp.os.linux.development.system | Previous | NextPrevious in thread | Find similar


Thread

rpath for library loading Philipp Kraus <philipp.kraus@flashpixx.de> - 2012-12-17 09:53 +0100
  Re: rpath for library loading Richard Kettlewell <rjk@greenend.org.uk> - 2012-12-17 10:42 +0000
    Re: rpath for library loading Philipp Kraus <philipp.kraus@flashpixx.de> - 2012-12-17 13:36 +0100
      Re: rpath for library loading Richard Kettlewell <rjk@greenend.org.uk> - 2012-12-17 13:26 +0000
      Re: rpath for library loading Rainer Weikusat <rweikusat@mssgmbh.com> - 2012-12-17 15:03 +0000

csiph-web