[Bug 187114] rtld(1) does not expand $ORIGIN unless DF_ORIGIN flag is set
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Apr 24 18:06:16 UTC 2015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=187114
--- Comment #1 from Ed Maste <emaste at freebsd.org> ---
When the dynamic linker loads an object that uses $ORIGIN, it must calculate
the pathname of the directory containing the object. Because this calculation
can be computationally expensive, implementations may want to avoid the
calculation for objects that do not use $ORIGIN. If an object calls dlopen()
with a string containing $ORIGIN and does not use $ORIGIN in one if its dynamic
array entries, the dynamic linker may not have calculated the pathname for the
object until the dlopen() actually occurs. Since the application may have
changed its current working directory before the dlopen() call, the calculation
may not yield the correct result. To avoid this possibility, an object may
signal its intention to reference $ORIGIN by setting the DF_ORIGIN flag. An
implementation may reject an attempt to use $ORIGIN within a dlopen() call from
an object that did not set the DF_ORIGIN flag and did not use $ORIGIN within
its dynamic array.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list