This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is '$ORIGIN' supposed to work within DT_NEEDED sections?


>> Yes, $ORIGIN is supposed to work
> Please, note, that I'm talking not about putting '$ORIGIN' into 'RPATH'
> field, but about putting it directly into 'NEEDED' field. E.g. not about
> this:
>     objdump -p file | egrep RPATH\|NEEDED
>       RPATH                $ORIGIN/dir1:$ORIGIN/dir2/dir3
>       NEEDED               lib1.so
>       NEEDED               lib2.so
> … but about this:
>     objdump -p file | egrep RPATH\|NEEDED
>       NEEDED               $ORIGIN/dir1/lib1.so
>       NEEDED               $ORIGIN/dir2/dir3/lib2.so
> Did you notice it?

Yes, it's supposed to work. From "Substitution Sequences" in the gABI:

"Within a string provided by dynamic array entries with the DT_NEEDED
or DT_RUNPATH tags and in pathnames passed as parameters to the
dlopen() routine, a dollar sign ($) introduces a substitution
sequence. ..."

http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#substitution

-cary


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]