Chapter 4. LWLINK

The LWTOOLS linker is called LWLINK. This chapter documents the various features of the linker.

4.1. Command Line Options

The binary for LWLINK is called "lwlink". Note that the binary is in lower case. lwlink takes the following command line arguments.

--decb, -b

Selects the DECB output format target. This is equivalent to --format=decb

--output=FILE, -o FILE

This option specifies the name of the output file. If not specified, the default is a.out.

--format=TYPE, -f TYPE

This option specifies the output format. Valid values are decb and raw

--raw, -r

This option specifies the raw output format. It is equivalent to --format=raw and -f raw

--script=FILE, -s

This option allows specifying a linking script to override the linker's built in defaults.

--section-base=SECT=BASE

Cause section SECT to load at base address BASE. This will be prepended to the built-in link script. It is ignored if a link script is provided.

--map=FILE, -m FILE

This will output a description of the link result to FILE.

--library=LIBSPEC, -l LIBSPEC

Load a library using the library search path. If LIBSPEC is prefixed with a colon (":"), then LIBSPEC is the precise filename to be searched for in the library path. Otherwise, LIBSPEC will have "lib" prepended and ".a" appended.

--library-path=DIR, -L DIR

Add DIR to the library search path.

--debug, -d

This option increases the debugging level. It is only useful for LWTOOLS developers.

--help, -?

This provides a listing of command line options and a brief description of each.

--usage

This will display a usage summary of each command line option.

--version, -V

This will display the version of LWLINK.