aboutsummaryrefslogtreecommitdiff
path: root/libexec/rtld-elf/rtld.1
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/rtld-elf/rtld.1')
-rw-r--r--libexec/rtld-elf/rtld.158
1 files changed, 51 insertions, 7 deletions
diff --git a/libexec/rtld-elf/rtld.1 b/libexec/rtld-elf/rtld.1
index 2d262f77aa13..a152dd444bd7 100644
--- a/libexec/rtld-elf/rtld.1
+++ b/libexec/rtld-elf/rtld.1
@@ -26,9 +26,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $FreeBSD$
-.\"
-.Dd June 2, 2021
+.Dd October 29, 2023
.Dt RTLD 1
.Os
.Sh NAME
@@ -76,6 +74,14 @@ Translated to the name of the operating system implementation.
Translated to the release level of the operating system.
.It Pa $PLATFORM
Translated to the machine hardware platform.
+.It Pa $LIB
+Translated to the system library path component on the platform.
+It is
+.Pa lib
+for native binaries, and typically
+.Pa lib32
+for compat32 binaries.
+Other translations might exist for other ABIs supported on the platform.
.El
.Pp
The
@@ -143,6 +149,24 @@ If set,
.Nm
will print a table containing all relocations before symbol
binding and relocation.
+.It Ev LD_DYNAMIC_WEAK
+If set, use the ELF standard-compliant symbol lookup behavior:
+resolve to the first found symbol definition.
+.Pp
+By default,
+.Fx
+provides the non-standard symbol lookup behavior:
+when a weak symbol definition is found, remember the definition and
+keep searching in the remaining shared objects for a non-weak definition.
+If found, the non-weak definition is preferred, otherwise the remembered
+weak definition is returned.
+.Pp
+Symbols exported by dynamic linker itself (see
+.Xr dlfcn 3 )
+are always resolved using
+.Fx
+rules regardless of the presence of the variable.
+This variable is unset for set-user-ID and set-group-ID programs.
.It Ev LD_LIBMAP
A library replacement list in the same format as
.Xr libmap.conf 5 .
@@ -190,6 +214,10 @@ to be linked in before any
other shared libraries.
If the directory is not specified then
the directories specified by
+.Ev LD_LIBRARY_PATH
+will be searched first
+followed by the set of built-in standard directories.
+This variable is unset for set-user-ID and set-group-ID programs.
.It Ev LD_PRELOAD_FDS
A colon separated list of file descriptor numbers for libraries.
This is intended for preloading libraries in which we already have a file
@@ -198,10 +226,6 @@ This may optimize the process of loading libraries because we do not have to
look for them in directories.
It may also be useful in a capability base system where we do not have access to
global namespaces such as the filesystem.
-.Ev LD_LIBRARY_PATH
-will be searched first
-followed by the set of built-in standard directories.
-This variable is unset for set-user-ID and set-group-ID programs.
.It Ev LD_LIBRARY_PATH_FDS
A colon separated list of file descriptor numbers for library directories.
This is intended for use within
@@ -291,6 +315,20 @@ will process the filtee dependencies of the loaded objects immediately,
instead of postponing it until required.
Normally, the filtees are opened at the time of the first symbol resolution
from the filter object.
+.It Ev LD_SHOW_AUXV
+If set, causes
+.Nm
+to dump content of the aux vector to standard output, before passing
+control to any user code.
+.It Ev LD_STATIC_TLS_EXTRA
+If the variable is specified and has a numeric value,
+.Nm
+will set the size of the static TLS extra space to the specified number
+of bytes.
+The static TLS extra space is used when loading objects compiled for
+initial-exec TLS code model with
+.Xr dlopen 3 .
+The minimum value that can be specified is \'128\'.
.El
.Sh DIRECT EXECUTION MODE
.Nm
@@ -312,6 +350,7 @@ The syntax of the direct invocation is
.Bd -ragged -offset indent
.Pa /libexec/ld-elf.so.1
.Op Fl b Ar exe
+.Op Fl d
.Op Fl f Ar fd
.Op Fl p
.Op Fl u
@@ -334,6 +373,8 @@ If this option is specified,
is only used to provide the
.Va argv[0]
value to the program.
+.It Fl d
+Turn off the emulation of the binary execute permission.
.It Fl f Ar fd
File descriptor
.Ar fd
@@ -385,6 +426,9 @@ ignores
and is naturally prone to race conditions.
Environments which rely on such restrictions are weak
and breakable on their own.
+It can be turned off with the
+.Fl d
+option.
.Sh VERSIONING
Newer
.Nm