Output format options


The following options each select a different output format (and, hence, are mutually exclusive):

-AIF

Generate an output image in executable ARM Image Format (the default if no output format option is given). The default load address for an AIF image is 0x8000 (32KB). Any other address (greater than 0x80) can be specified by using the -Base option (see Special options). AIF is described in ARM image format of the Reference Manual, and in ARM Image Format (Technical Specifications).

-AIF -Relocatable

Generate a relocatable AIF image which when entered self-relocates to its load address.

-AIF -Relocatable -Workspace n

Generate a relocatable AIF image which when entered copies itself to within n bytes of the top of memory and self-relocates to that address. For a description of -Workspace see section Special options).

Some fields of the AIF header and the self-relocation code generated by armlink can be customised by giving your versions in areas called AIF_HDR and AIF_RELOC, respectively, in the first object file in the input list. AIF_HDR must be exactly 128 bytes long (for further details see ARM image format).

-AIF -BIN

Generate a plain binary image preceded by an AIF header which describes it (see the following descriptions of -BIN and -BIN -AIF for further details). The default base address for images of type -AIF -BIN is 0, but any other address can be specified by using the -Base option (see Special options).

-AOF

Generate partially linked output, in ARM Object Format (AOF), suitable for inclusion in a subsequent link step. AOF is described in section ARM object format of the Reference Manual, and in ARM Object Format(Technical Specifications.)

-BIN

Generate a plain binary image. The default load address for a binary image is 0. Any other address can be specified using the -Base option (see Special options). Plain binary images are described in Plain binary format .

-BIN -AIF

Generate a plain binary image preceded by an AIF header which describes it. This format is intended to be consumed by simple program loaders and is the format of choice for them.

Such an image cannot be executed by loading it at its load address and entering it at its first word: the AIF header must be discarded first and the image must be entered at its entry point. As with a plain AIF image, the base address, which defaults to 0, can be set using the -Base option (see Special options). Note that with -BIN -AIF, the base address is the address of the binary image, not the address of the AIF header (which is discarded). A separate base address can be given for the image's data segment using the -DATA option (see Special options); otherwise, by default, data are linked immediately following code. This option directly supports images with code in ROM and data in RAM.

-IHF

Generate a plain binary image encoded in extended Intellec Hex Format. The output is ASCII-coded.

-SHL <file>

Generate a position-independent reentrant read-only sharable library, suitable for placement in ROM, together with a non-reentrant stub in ARM Object Format (in the file named by the -Output keyword) which can be used in a subsequent client link step. A description of what is to be exported from the library is given in file, which also contains the name of the file to hold the sharable library image. See the Describing a shared library to the linker for further details.

-SHL <file> -REENTrant

As for -SHL, except that a reentrant stub is generated rather than a non-reentrant stub. A reentrant stub is required if some other shared library is to refer to this one (by including the code of the reentrant stub in it). Dually, a reentrant stub demands a reentrant client. Usually, a client application is not reentrant (multi-threadable) so the default non-reentrant stub is more often useful.

-SPLIT

This option tells the linker to output the read-only and read-write image sections to separate output files. It may be used only in conjunction with -BIN and -IHF image types, and is meaningful only if separate read-only and read-write base addresses have been specified (see -RO-base <base-address> -Base <base-address> and -RW-base <data-base-address> -DATA <data-base-address>). The separate output files are named as in the following table:

l

---------------------------------------------------------
linker command-line     |output file    |output file     
options                 |namesread-only |namesread-write 
---------------------------------------------------------
-o file -SPLIT -RO      |file.ro        |file.rw         
robase -RW rwbase       |               |                
---------------------------------------------------------
-o file -SPLIT -B robase|file           |file.dat        
-DATA rwbase            |               |                
---------------------------------------------------------
-OVerlay <file>

Generate a statically overlaid image, as described in file. The output is a root AIF image together with a collection of plain binary overlay segments. Although the static overlay scheme is independent of the target system, parts of the overlay manager are not, and must be re-implemented for each target environment.

-OVerlay file -Relocatable

Generate a dynamically relocatable overlaid image, as described in file. The output is a relocatable AIF root image together with a collection of relocatable plain binary overlay segments. Although the dynamic overlay scheme is independent of the target system, parts of the overlay manager are not, and must be re-implemented for each target environment.