xref: /dragonfly/usr.sbin/resident/resident.8 (revision 0c20b875)
1*0c20b875SSascha Wildner.Dd March 7, 2016
28ca15ec8SMatthew Dillon.Dt RESIDENT 8
333a8b578SMatthew Dillon.Os
433a8b578SMatthew Dillon.Sh NAME
533a8b578SMatthew Dillon.Nm resident
64041d919SSascha Wildner.Nd Make a dynamic binary resident
733a8b578SMatthew Dillon.Sh SYNOPSIS
833a8b578SMatthew Dillon.Nm
959e2aa11SHiten Pandya.Op Fl l
108ca15ec8SMatthew Dillon.Op Fl f
118ca15ec8SMatthew Dillon.Op Fl x Ar id
128ca15ec8SMatthew Dillon.Op Fl d
138ca15ec8SMatthew Dillon.Op Fl R
1459e2aa11SHiten Pandya.Ar "program ..."
1533a8b578SMatthew Dillon.Sh DESCRIPTION
168ca15ec8SMatthew DillonThe
178ca15ec8SMatthew Dillon.Nm
187ea5cb81SHiten Pandyautility may be used to make a dynamic binary memory-resident.
197ea5cb81SHiten PandyaThis works
208ca15ec8SMatthew Dillonby running the binary just past its DLL mmap's and relocation and then
217ea5cb81SHiten Pandyamaking a copy of its vmspace.
227ea5cb81SHiten PandyaThe copy is registered in the kernel and later
237ea5cb81SHiten Pandyaexec's of the program will cause a copy of the copy to be used.
247ea5cb81SHiten PandyaWhen
257ea5cb81SHiten Pandya.Pa ld-elf.so
267ea5cb81SHiten Pandyadetects that it is running resident, it skips all initial library
278ca15ec8SMatthew Dillonloads (because they are already loaded).
288ca15ec8SMatthew Dillon.Pp
297ea5cb81SHiten PandyaCare must be taken when using this program.
307ea5cb81SHiten PandyaIt is recommended that you
318ca15ec8SMatthew Dillondelete all resident registrations when updating the system shared libraries
328ca15ec8SMatthew Dillonand binaries.
338ca15ec8SMatthew Dillon.Pp
348ca15ec8SMatthew DillonThe following options are available:
358ca15ec8SMatthew Dillon.Bl -tag -width indent
3659e2aa11SHiten Pandya.It Fl l
3759e2aa11SHiten PandyaList binaries that are currently memory-resident.
388ca15ec8SMatthew Dillon.It Fl f
397ea5cb81SHiten PandyaForce mode, even if the binary does not appear to be a dynamic binary.
407ea5cb81SHiten PandyaThis way you can run resident through statically compiled wrappers.  The first
418ca15ec8SMatthew Dillondynamic binary encountered in the exec chain will be operated on.
428ca15ec8SMatthew Dillon.It Fl x Ar id
438ca15ec8SMatthew DillonDelete a registration by id.
448ca15ec8SMatthew Dillon.It Fl d
457ea5cb81SHiten PandyaDelete a registration by program name.
467ea5cb81SHiten PandyaIf neither of the above two options are specified a new registration is created.
478ca15ec8SMatthew Dillon.It Fl R
488ca15ec8SMatthew DillonDelete all registrations in the kernel.
498ca15ec8SMatthew Dillon.El
5033a8b578SMatthew Dillon.Sh SEE ALSO
5133a8b578SMatthew Dillon.Xr ld 1 ,
5233a8b578SMatthew Dillon.Xr ldd 1 ,
5333a8b578SMatthew Dillon.Xr nm 1 ,
54fe67c94aSSascha Wildner.Xr rtld 1 ,
55*0c20b875SSascha Wildner.Xr exec_sys_register 2 ,
56fe67c94aSSascha Wildner.Xr resident.conf 5
577ea5cb81SHiten Pandya.Sh AUTHORS
587ea5cb81SHiten PandyaThe
597ea5cb81SHiten Pandya.Nm
6097a96273SFranco Fichtnerprogram, its kernel supplement and this manual page were written by
61e65bc1c3SFranco Fichtner.An Matthew Dillon Aq Mt dillon@backplane.com .
62