2L(1)                                                       2L(1)

     NAME
          2l, 6l, 8l, kl, vl, zl - loaders

     SYNOPSIS
          2l [ option ... ] [ name ... ]
          6l [ option ... ] [ name ... ]
          8l [ option ... ] [ name ... ]
          kl [ option ... ] [ name ... ]
          vl [ option ... ] [ name ... ]
          zl [ option ... ] [ name ... ]

     DESCRIPTION
          2l, 6l, 8l, kl, vl, and zl load the named files into
          MC68020, i960, i386, SPARC, MIPS, and Hobbit executable
          files.  The files should be object files or libraries
          (archives of object files) for the appropriate architecture.
          Also, a name like -lext represents the library libext.a in
          /$objtype/lib, where objtype is one of 68020, 960, 386,
          sparc, mips, or hobbit . In practice, such options are
          rarely necessary as the header files for the libraries cause
          their archives to be included automatically in the load (see
          2c(1)). The libraries must have tables of contents (see
          rl(1)).

          Normally there is an implicit -lc after the named files to
          search the C library /$objtype/lib/libc.a.  Also, the loader
          creates an undefined symbol _main (or _mainp if profiling is
          enabled) to force loading of the startup linkage from the C
          library.

          The loader options are:

          -l        (As a bare option.)  Suppress the default loading
                    of the C library and startup linkage.

          -o out    Place output in file out. Default is O.out, where
                    O is the first letter of the loader name.

          -p        Insert profiling code into the executable output.

          -s        Strip the symbol tables from the output file.

          -a        Print the object code in assembly language, with
                    addresses.

          -v        Print debugging output that annotates the activi-
                    ties of the load.

          -Hn       Executable header is type n. The meaning of the
                    types is architecture-dependent; typically type 1

     Page 1                       Plan 9            (printed 11/17/24)

     2L(1)                                                       2L(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.

          -Tt       The text segment starts at address t.

          -Dd       The data segment starts at address d.

          -Rr       The text segment is rounded to a multiple of r (if
                    r is nonzero).

          The numbers in the above options can begin with `0x' or `0'
          to change the default base from decimal to hexadecimal or
          octal.  The defaults for the values depend on the compiler
          and the header type.

     FILES
          /$objtype/lib  for -llib arguments.

     SEE ALSO
          2c(1), 2a(1), ar(1), rl(1), nm(1), db(1), prof(1)

          Rob Pike, ``How to Use the Plan 9 C Compiler''

     Page 2                       Plan 9            (printed 11/17/24)