[next] [prev] [prev-tail] [tail] [up]

#### $L or $LINK : Link object file

The {$L filename} or {$LINK filename} directive tells the compiler that the file filename should be linked to the program. This cannot be used for libraries, see section section 1.1, page 71 for that.

The compiler will look for this file in the following way:

1. It will look in the path specified in the object file name.
2. It will look in the directory where the current source file is.
3. it will look in all directories specified in the object file search path.

Directories can be added to the object file search path with the -Fo option.

On L I N U X systems and on operating systems with case-sensitive filesystems (such as U N I X systems), the name is case sensitive, and must be typed exactly as it appears on your system.

Remark:Take care that the object file you’re linking is in a format the linker understands. Which format this is, depends on the platform you’re on. Typing ld or ld --help on the command line gives a list of formats ld knows about. Other files and options can be passed to the linker using the -k command-line option. More than one of these options can be used, and they will be passed to the linker, in the order that they were specified on the command line, just before the names of the object files that must be linked.

[next] [prev] [prev-tail] [front] [up]