Merge branch 'vendor/TRE'
[dragonfly.git] / usr.sbin / resident / resident.8
1 .Dd May 21, 2003
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
16 The
17 .Nm
18 utility may be used to make a dynamic binary memory-resident.
19 This works
20 by running the binary just past its DLL mmap's and relocation and then
21 making a copy of its vmspace.
22 The copy is registered in the kernel and later
23 exec's of the program will cause a copy of the copy to be used.
24 When
25 .Pa ld-elf.so
26 detects that it is running resident, it skips all initial library
27 loads (because they are already loaded).
28 .Pp
29 Care must be taken when using this program.
30 It is recommended that you
31 delete all resident registrations when updating the system shared libraries
32 and binaries.
33 .Pp
34 The following options are available:
35 .Bl -tag -width indent
36 .It Fl l
37 List binaries that are currently memory-resident.
38 .It Fl f
39 Force mode, even if the binary does not appear to be a dynamic binary.
40 This way you can run resident through statically compiled wrappers.  The first
41 dynamic binary encountered in the exec chain will be operated on.
42 .It Fl x Ar id
43 Delete a registration by id.
44 .It Fl d
45 Delete a registration by program name.
46 If neither of the above two options are specified a new registration is created.
47 .It Fl R
48 Delete 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 resident.conf 5
56 .Sh AUTHORS
57 The
58 .Nm
59 program, its kernel supplement and this manual page were written by
60 .An Matthew Dillon Aq Mt dillon@backplane.com .