[Bug dynamic-link/17251] RPATH of shared libraries doesn't follow symlinks for $ORIGIN
carlos at redhat dot com
sourceware-bugzilla@sourceware.org
Tue Jun 5 11:39:00 GMT 2018
https://sourceware.org/bugzilla/show_bug.cgi?id=17251
--- Comment #9 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Florian Weimer from comment #8)
> (In reply to Carlos O'Donell from comment #7)
> > Note that the gABI says:
> > ~~~
> > 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.
> > ...
> > If the name is ``ORIGIN'', then the substitution sequence is replaced by the
> > dynamic linker with the absolute pathname of the directory in which the
> > object containing the substitution sequence originated. Moreover, the
> > pathname will contain no symbolic links or use of ``.'' or ``..''
> > components. Otherwise (when the name is not ``ORIGIN'') the behavior of the
> > dynamic linker is unspecified.
> > ~~~
> > http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#shobj_dependencies
> >
> > It seems to me that the entire sequence, including $ORIGIN, is considered a
> > "pathname", and that "pathname" should contain no symbolic links, ".", or
> > ".." components.
> >
> > Therefore following symlinks seems against the specification of $ORIGIN?
>
> Isn't it saying the opposite, that symbolic links must be resolved in the
> expansion of $ORIGIN?
Oh, I see how you could interpret that.
You are saying that the phrasing "absolute pathname of the directory" means
that symbolic links *must* be dereferenced?
I was looking at the phrasing "the pathname will contain no symbolic links" as
meaning that the pathname *before* the expansion shall contain no symbolic
links, otherwise the behaviour of the dynamic linker is unspecified. That the
intent of the authors was to simplify the dynamic linker implementation to not
have to handle the path expansion and symbolic link following to compute the
path name.
Which interpretation was yours?
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list