Command Line Options

Option Processing

Single-letter options may be followed by an argument with or without whitespace, or following an =. Example: the following are equivalent:

-oargument

-o=argument

-o argument

In the case of ambiguity between a single-letter option with an appended argument, and a multiple-letter option, the multiple letter option takes precedence. Use either of the other single-letter option forms when required.

Multiple-letter options may be preceded by one or two dashes; an argument must be separated by an = or given as the following argument. Example: the following are equivalent:

-option=argument

-option argument

Options

@commandfile (aliases: -Tcommandfile)

Additional options are read from file commandfile. Within the command file, the pound sign (#) marks the remainder of that line as a comment.

-A file (aliases: -R)

Read in symbol names and addresses only from object file file. The object file's contents will not be relocated or included in the output. This is useful when one linker image must refer to symbols which are located in another separately linked image.

-a

Causes the output file to be relocatable and executable. Relocation is performed, and final link steps are performed (such as C++ constructors creation, common allocation, and special symbol creation), but relocation information is retained in the output file. Implies -r.

Some of the final link steps, including but not limited to: C++ constructors and special symbols, are not guaranteed to have relocations, and thus may not be valid if the outfile file is loaded at a different address.

-checksum/-nochecksum (default: -nochecksum)

Add a 4-byte checksum to the end of every program section. The algorithm used is a standard 32-bit CRC using polynomial 0x10211021.

-e symbol

The program's entry point is set to the address of symbol. See Program Entry Point.

-sections { ... } (aliases: -sec, SECTIONS)

Specifies a section map. See Section and Memory Maps.

-L directory

Add directory to those searched for libraries specified by -l; may be repeated. All -L options on the command-line will be processed before any -l options. Directories will be searched in the order which they appear on the command-line.

-lname

Look for libname.a in directories specified by -L.

-memory { ... } (aliases: MEMORY)

Specifies a memory map. See Section and Memory Maps.

-r

Causes the output file to retain relocation information. The output file may be used as an input file in further link steps. Implies -undefined. See also -a.

-undefined

Causes elxr to not check for undefined symbol references. Any undefined symbols will be given an address of 0. See also -a.


Previous

Next



Copyright © 1999, Green Hills Software. All rights reserved.