This is the mail archive of the mailing list for the glibc 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: [PATCH][v2] Add dynamic linker support for $EXEC_ORIGIN.

On Fri, Dec 20, 2013 at 11:45 AM, Mike Frysinger <> wrote:
> this probably should be documented somewhere in glibc (beyond just the code
> itself).  a quick scan of the manual though doesn't seem to turn up any
> discussion of topics like rpath or $ORIGIN, so i guess the assumption is that
> we follow the standard ELF conventions.  which leads into the next point ...
> shouldn't it also be coordinated (at least loosely) with the linker and ELF
> ABI peeps ?  they already fully document (and in some cases implement) the
> semantics of DT_RPATH/DT_RUNPATH, so having glibc add its own (undocumented)
> extensions doesn't seem like a good idea.

Agreed that this needs to be documented, and I was surprised
substitution patterns are not mentioned in the glibc documentation.
However, the $ORIGIN and other similar substituation patterns are
documented in the manpage that's part of the Linux man-pages
project, and I am planning to submit a patch there once this is
accepted.  (See, e.g., for a
current version.)

IIUC, the latest version of the ELF ABI specification is  (That's a
draft from 10 June 2013.)  That mentions $ORIGIN, but states that the
behavior for other substitution patterns starting with $ is
"unspecified".  We already have a couple of additional extensions in
glibc that are not in the ABI specification: $LIB and $PLATFORM.
Adding another seems not unreasonable.

I'm also not seeing any documentation of these patterns in the GNU
linker manual (;
in particular, the -rpath option documentation doesn't mention it.  Am
I missing something there?  I'd be happy to coordinate if there's
coordination that needs to be done.

- Brooks

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