0l, 1l, 2l, 5l, 6l, 8l, kl, ql, vl – loaders
load the named
into executable files for the corresponding architectures; see
for the correspondence between an architecture and the character
etc.) that specifies it.
The files should be object files or libraries (archives of object files)
for the appropriate architecture.
Also, a name like
represents the library
is one of
etc. as listed in
The libraries must have tables of contents
options are rarely necessary as the header files for
the libraries cause their archives to be included automatically in the load
For example, any program that includes header file
causes the loader
to search the C library
Also, the loader creates an undefined symbol
if profiling is enabled) to force loading of the
startup linkage from the C library.
The order of search to resolve undefined symbols is to load all files and libraries
mentioned explicitly on the command line, and then to resolve remaining symbols
by searching in topological order
libraries mentioned in header files included by files already loaded.
When scanning such libraries, the algorithm is to scan each library repeatedly until
no new undefined symbols are picked up, then to start on the next library. Thus if library
again, it may be necessary to mention
explicitly so it will be read a second time.
The loader options are:
(As a bare option.)
Suppress the default loading of the startup linkage and libraries
specified by header files.
Place output in file
is the first letter of the loader name.
Insert profiling code into the executable output; no special action is needed
during compilation or assembly.
Insert (embedded) tracing code into the executable output; no special action is needed
during compilation or assembly.
The added code calls
at function entries
at function exits.
(ARM only) Don’t generate VFP hardware floating point instructions.
Strip the symbol tables from the output file.
Print the object code in assembly language, with addresses.
Print debugging output that annotates the activities of the load.
only) Generate instructions rather than calls to emulation routines
for multiply and divide.
The entry point for the binary is
-x [ file ]
Produce an export table in the executable.
restricts the exported symbols to those listed in the file.
-u [ file ]
Produce an export table, import table
and a dynamic load section in the executable.
restricts the imported symbols to those listed in the file.
Move strings into the text segment.
Executable header is type
The meaning of the types is architecture-dependent; typically
type 1 is Plan 9 boot format and type 2 is the
regular Plan 9 format, the default. These are reversed on the MIPS.
The Next boot format is 3. Type 4 in
creates a MIPS executable for an SGI Unix system.
The text segment starts at address
The data segment starts at address
The text segment is rounded to a multiple of
The numbers in the above options can begin with
to change the default base from decimal to hexadecimal or octal.
The defaults for the values depend on the compiler and the
The loaded image has several symbols inserted by the loader:
is the address of the end of the text segment;
is the address of the beginning of the data segment;
is the address of the end of the data segment;
is the address of the end of the bss segment, and of the program.
“How to Use the Plan 9 C Compiler”
The list of loaders given above is only partial,
not all architectures are supported on all systems,
some have been retired and some
are provided by third parties.