xref: /dragonfly/usr.sbin/resident/resident.8 (revision e98bdfd3)
1.Dd March 7, 2016
2.Dt RESIDENT 8
3.Os
4.Sh NAME
5.Nm resident
6.Nd Make a dynamic binary resident
7.Sh SYNOPSIS
8.Nm
9.Op Fl l
10.Op Fl f
11.Op Fl x Ar id
12.Op Fl d
13.Op Fl R
14.Ar "program ..."
15.Sh DESCRIPTION
16The
17.Nm
18utility may be used to make a dynamic binary memory-resident.
19This works
20by running the binary just past its DLL mmap's and relocation and then
21making a copy of its vmspace.
22The copy is registered in the kernel and later
23exec's of the program will cause a copy of the copy to be used.
24When
25.Pa ld-elf.so
26detects that it is running resident, it skips all initial library
27loads (because they are already loaded).
28.Pp
29Care must be taken when using this program.
30It is recommended that you
31delete all resident registrations when updating the system shared libraries
32and binaries.
33.Pp
34The following options are available:
35.Bl -tag -width indent
36.It Fl l
37List binaries that are currently memory-resident.
38.It Fl f
39Force mode, even if the binary does not appear to be a dynamic binary.
40This way you can run resident through statically compiled wrappers.  The first
41dynamic binary encountered in the exec chain will be operated on.
42.It Fl x Ar id
43Delete a registration by id.
44.It Fl d
45Delete a registration by program name.
46If neither of the above two options are specified a new registration is created.
47.It Fl R
48Delete all registrations in the kernel.
49.El
50.Sh SEE ALSO
51.Xr ld 1 ,
52.Xr ldd 1 ,
53.Xr nm 1 ,
54.Xr rtld 1 ,
55.Xr exec_sys_register 2 ,
56.Xr resident.conf 5
57.Sh AUTHORS
58The
59.Nm
60program, its kernel supplement and this manual page were written by
61.An Matthew Dillon Aq Mt dillon@backplane.com .
62