Changeset View
Changeset View
Standalone View
Standalone View
head/libexec/rtld-elf/rtld.1
Show First 20 Lines • Show All 277 Lines • ▼ Show 20 Lines | |||||
.It Ev LD_LOADFLTR | .It Ev LD_LOADFLTR | ||||
If set, | If set, | ||||
.Nm | .Nm | ||||
will process the filtee dependencies of the loaded objects immediately, | will process the filtee dependencies of the loaded objects immediately, | ||||
instead of postponing it until required. | instead of postponing it until required. | ||||
Normally, the filtees are opened at the time of the first symbol resolution | Normally, the filtees are opened at the time of the first symbol resolution | ||||
from the filter object. | from the filter object. | ||||
.El | .El | ||||
.Sh DIRECT EXECUTION MODE | |||||
.Nm | |||||
is typically used implicitly, loaded by the kernel as requested by the | |||||
.Dv PT_INTERP | |||||
program header of the executed binary. | |||||
.Fx | |||||
also supports a direct execution mode for the dynamic linker. | |||||
In this mode, the user explicitly executes | |||||
.Nm | |||||
and provides the path of the program to be linked and executed as | |||||
an argument. | |||||
This mode allows use of a non-standard dynamic linker for a program | |||||
activation without changing the binary or without changing | |||||
the installed dynamic linker. | |||||
Execution options may be specified. | |||||
.Pp | |||||
The syntax of the direct invocation is | |||||
.Bd -ragged -offset indent | |||||
.Pa /libexec/ld-elf.so.1 | |||||
.Op Fl f Ar fd | |||||
.Op Fl p | |||||
.Op Fl - | |||||
.Pa image_path | |||||
.Op Ar image arguments | |||||
.Ed | |||||
.Pp | |||||
The options are as follows: | |||||
wblock: s/ as follows// | |||||
.Bl -tag -width indent | |||||
.It Fl f Ar fd | |||||
File descriptor | |||||
.Ar fd | |||||
references the binary to be activated by | |||||
.Nm . | |||||
It must already be opened in the process when executing | |||||
.Nm . | |||||
If this option is specified, | |||||
.Ar image_path | |||||
is only used to provide the | |||||
.Va argv[0] | |||||
value to the program. | |||||
.It Fl p | |||||
If the | |||||
.Pa image_path | |||||
argument specifies a name which does not contain a slash | |||||
.Dq Li / | |||||
character, | |||||
.Nm | |||||
uses the search path provided by the environment variable | |||||
.Dv PATH | |||||
to find the binary to execute. | |||||
.It Fl - | |||||
Ends the | |||||
.Nm | |||||
options. | |||||
The argument following | |||||
.Fl - | |||||
is interpreted as the path of binary to execute. | |||||
wblockUnsubmitted Done Inline Actionss/binary/the binary/ wblock: s/binary/the binary/ | |||||
.El | |||||
.Pp | |||||
To conform to user expectation to not break some naively restricted | |||||
wblockUnsubmitted Done Inline ActionsThis is a somewhat confusing sentence. Attempt to rewrite: In the direct execution mode, .Nm emulates verification of the binary execute permission for the current user. This is done to avoid breaking user expectations in naively restricted execution environments. The verification only uses Unix wblock: This is a somewhat confusing sentence. Attempt to rewrite:
```In the direct execution mode,
. | |||||
execution environments, in the direct execution mode | |||||
.Nm | |||||
emulates verification of the binary execute permission | |||||
for current user. | |||||
The verification only uses Unix | |||||
.Dv DACs , | |||||
ignores | |||||
.Dv ACLs | |||||
and is racy by its nature. | |||||
wblockUnsubmitted Done Inline ActionsISWYM by "racy", but I'm not sure it's a clear description. "its" is not needed. So maybe: and is naturally prone to race conditions. wblock: ISWYM by "racy", but I'm not sure it's a clear description. "its" is not needed. So maybe… | |||||
The environments which rely on such restrictions are weak | |||||
wblockUnsubmitted Done Inline Actionss/The environments/Environments/ wblock: s/The environments/Environments/ | |||||
and breakable on its own. | |||||
wblockUnsubmitted Done Inline Actionsand breakable on their own. wblock: ```and breakable on their own.``` | |||||
.Sh FILES | .Sh FILES | ||||
.Bl -tag -width ".Pa /var/run/ld-elf32.so.hints" -compact | .Bl -tag -width ".Pa /var/run/ld-elf32.so.hints" -compact | ||||
.It Pa /var/run/ld-elf.so.hints | .It Pa /var/run/ld-elf.so.hints | ||||
Hints file. | Hints file. | ||||
.It Pa /var/run/ld-elf32.so.hints | .It Pa /var/run/ld-elf32.so.hints | ||||
Hints file for 32-bit binaries on 64-bit system. | Hints file for 32-bit binaries on 64-bit system. | ||||
.It Pa /etc/libmap.conf | .It Pa /etc/libmap.conf | ||||
The libmap configuration file. | The libmap configuration file. | ||||
Show All 10 Lines |
s/ as follows//