Files
seta75D ff309bfe1c Init
2021-10-11 18:37:13 -03:00

128 lines
2.6 KiB
Groff

.\" @(#)modload.8 1.1 94/10/31 SMI;
.TH MODLOAD 8 "31 May 1991"
.SH NAME
modload \- load a kernel module
.SH SYNOPSIS
.B modload
.I filename
[
.B \-d
]
[
.B \-v
]
[
.B \-sym
]
[
.BI \-A " vmunix_file"
]
[
.BI \-conf " config_file"
]
[
.BI \-entry " entry_point"
]
.if t .ti +.5i
[
.BI \-exec " exec_file"
]
[
.BI \-o " output_file"
]
.SH DESCRIPTION
.IX "modload command" "" "\fLmodload\fP \(em load a module"
.LP
.B modload
loads a loadable module into a running system.
The input file
.I filename
is an object file
.RB ( .o
file).
.SH OPTIONS
.TP
.B \-d
Debug.
Used to debug
.B modload
itself.
.TP
.B \-v
Verbose.
Print comments on the loading process.
.TP
.B \-sym
Preserve symbols for use by
.BR kadb (8S).
.TP
.BI \-A " vmunix_file
Specify the file that is passd to the linker to resolve module references to
kernel symbols.
The default is
.BR /vmunix .
The symbol file must be for the currently
running kernel or the module is likely to crash the system.
.TP
.BI \-conf " config_file"
Use this configuration file to configure the loadable driver being loaded.
The commands in this file are the same as those that the
.BR config (8)
program recognizes.
There are two additional commands recognized,
.B blockmajor
and
.BR charmajor .
See the
.TX DRIVER
for information on these commands.
.TP
.BI \-entry " entry_point"
Specify the module entry point.
This is passed by
.B modload
to
.BR ld (1)
when the module is linked.
The default module entry point name is
\&`\fIxxx\|\fBinit\fR'.
.TP
.BI \-exec " exec_file"
Specify the name of a shell script or executable image file that
will 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.
Module types are listed in
.BR /usr/include/sun/vddrv.h .
For loadable drivers, the
third and fourth arguments
are the block major and character major numbers respectively.
For a loadable system call, the third argument is the system call number.
.TP
.BI \-o " output_file"
Specify the name of the output file that is produced by the linker.
If this option
is omitted, then the output file name is
.I filename
without the
.RB ` .o '.
.SH BUGS
On Sun-3 machines, the
.BR config (8)
program generates assembly language wrappers to provide the proper
linkage to device interrupt handlers.
.B modload
does not generate these wrappers; on interrupt, control passes directly
to the loadable driver's interrupt handler. Consequently, the driver
must provide its own wrapper. See the ioconf.c file generated by
.BR config (8)
for examples of wrappers.
.SH SEE ALSO
.BR ld (1),
.BR config (8),
.BR kadb (8S),
.BR modunload (8),
.BR modstat (8)