The
utility compresses a kernel or some other bootable binary.
Operation
is in two phases as follows:
A load image of the executable file is built which omits all but
the
`text'
and
`data'
segments.
This image is compressed using
gzip(1)
and output as data in relocatable object format.
The object file is linked with a special self-hosting loader, producing
an executable suitable for booting with either the second- or
third-level bootstraps.
Supported object formats are 32-bit ELF and a.out ZMAGIC.
If the
file
operand has a
`.o'
suffix, input is assumed to be for the link phase, and the first phase
is omitted.
The options are:
-c
Omit the link phase.
-v
Display object file information.
-f format
Use
format
as the output format, where
format
is
`aout'
or
`elf'
The default format is ELF.
-l loader
Link
loader
as the loader.
-o output
Name the output file
output
The default is to use the input name with the suffix
`.o'
(for relocatables) or
`.kgz'
(for executables).
NOTES
Global variables equivalent to the following are defined in the output:
As symbols are lost, the usefulness of this utility for compressing
kernels is limited to situations where
loader(8)
cannot be used; otherwise the preferred method of compressing a kernel
is simply to
gzip(1)
it.