diff options
author | Eric Jackson <ericj@cvs.openbsd.org> | 2002-01-08 21:28:39 +0000 |
---|---|---|
committer | Eric Jackson <ericj@cvs.openbsd.org> | 2002-01-08 21:28:39 +0000 |
commit | b66e1d01583c979cfe0970d100ab100930407df3 (patch) | |
tree | a84ac0fac912a7e280de4aa48792d21c97b71605 /sbin/modload/modload.8 | |
parent | a4c50765d8e419c8282f7ac625d630914db21b43 (diff) |
add support in modload for ELF
from NetBSD
miod@ ok.
Diffstat (limited to 'sbin/modload/modload.8')
-rw-r--r-- | sbin/modload/modload.8 | 76 |
1 files changed, 43 insertions, 33 deletions
diff --git a/sbin/modload/modload.8 b/sbin/modload/modload.8 index 2b0278674d4..f63d3dd6cf1 100644 --- a/sbin/modload/modload.8 +++ b/sbin/modload/modload.8 @@ -1,5 +1,5 @@ -.\" $OpenBSD: modload.8,v 1.18 2001/09/17 11:45:20 assar Exp $ -.\" $NetBSD: modload.8,v 1.5 1995/03/18 14:56:43 cgd Exp $ +.\" $OpenBSD: modload.8,v 1.19 2002/01/08 21:28:38 ericj Exp $ +.\" $NetBSD: modload.8,v 1.17 2001/11/16 11:57:16 wiz Exp $ .\" .\" Copyright (c) 1993 Christopher G. Demetriou .\" All rights reserved. @@ -12,8 +12,13 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed for the +.\" NetBSD Project. See http://www.netbsd.org/ for +.\" information about NetBSD. +.\" 4. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -26,15 +31,17 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 7, 1993 +.\" <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>> +.\" +.Dd April 30, 1999 .Dt MODLOAD 8 .Os .Sh NAME .Nm modload .Nd load a kernel module .Sh SYNOPSIS -.Nm modload -.Op Fl dvsqu +.Nm "" +.Op Fl dnvsS .Op Fl A Ar kernel .Op Fl e Ar entry .Op Fl p Ar postinstall @@ -46,25 +53,25 @@ The utility loads a loadable kernel module into a running system. The input file is an object file (.o file). .Pp -The options are as follows: +The options to +.Nm +are as follows: .Bl -tag -width Ds .It Fl d -Debug. -Used to debug +Debug. Used to debug .Nm itself. +.It Fl n +Do everything, except calling the module entry point (and any +post-install program). .It Fl v Print comments about the loading process. .It Fl s -Do not load symbols from the kernel module. -.It Fl q -Be very quiet. -.It Fl u -Delete the loaded module -.Pq Ar output_file -after loading. -If the output file was not specified, this option causes the -temporary file to be kept rather than deleted. +Load the symbol table. +.It Fl S +Do not remove the temporary object file. By default, the +.Xr ld 1 +output is removed after being loaded into the kernel. .It Fl A Ar kernel Specify the file that is passed to the linker to resolve module references to external symbols. @@ -77,12 +84,14 @@ This is passed by to .Xr ld 1 when the module is linked. -The default module entry point name is -.Dq xxxinit . +The default module entry point name is `xxxinit'. +If `xxxinit' cannot be found, an attempt to use `<module_name>_lkmentry' +will be made, where <module_name> is the filename being loaded without +the `.o'. .It Fl p Ar postinstall Specify the name of a shell script or program that will -be executed if the module is successfully loaded. -It is always passed the module ID (in decimal) and module +be executed if the module is successfully loaded. It +is always passed the module id (in decimal) and module type (in hexadecimal) as the first two arguments. For loadable drivers, the third argument is the block or character major device number. @@ -91,12 +100,6 @@ call number. .It Fl o Ar output_file Specify the name of the output file that is produced by the linker. -If this option is not specified, a file in the -.Pa /tmp -directory -is used with the name generated from the module name with a -.Dq .out -extension. .El .Sh FILES .Bl -tag -width /usr/include/sys/lkm.h -compact @@ -105,13 +108,12 @@ default file passed to the linker to resolve external references in the module .It Pa /usr/include/sys/lkm.h file containing definitions of module types -.\" .It Pa output file. -.\" default output file name .El .Sh DIAGNOSTICS The .Nm -utility exits 0 on success or with a non-zero status if an error occurred. +utility exits with a status of 0 on success +and with a nonzero status if an error occurs. .Sh SEE ALSO .Xr ld 1 , .Xr lkm 4 , @@ -124,7 +126,15 @@ command was designed to be similar in functionality to the corresponding command in .Tn "SunOS 4.1.3" . .Sh AUTHORS -Terrence R. Lambert <terry@cs.weber.edu> +.An Terrence R. Lambert Aq terry@cs.weber.edu .Sh BUGS +.Bl -bullet +.It The loadable device driver framework can only reserve either a character or block device entry, not both. +.It +Loading the symbol table is expensive in terms of space: +it presently duplicates all the kernel symbols for each lkm loaded +with +.Fl s . +.El |