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