Keil™, An ARM® Company

RealView Linker and Utilities Guide

Specifying the output type and the output filename

2.2.5. Specifying the output type and the output filename

Specify the format and the name of the output file using the following options:

‑‑output file

Specifies the name of the output file. The file can be either a partially-linked object or an executable image. If the output filename is not specified, the linker uses the following defaults:

__image.axf

if the output is an executable image

__object.o

if the output is a partially-linked object.

If file is specified without path information, it is created in the current working directory. If path information is specified, then that directory becomes the default output directory.

‑‑partial

Creates a partially‑linked object instead of an executable image.

‑‑reloc

Creates relocatable ELF images.

A relocatable image has a dynamic segment that contains relocations that can be used to relocate the image post link-time. Examples of post link-time relocation include advanced ROM construction and dynamic loading at runtime.

If the image is loaded at its link-time address, the relocatable image produced by the linker does not require the relocations to be processed and debug data for the image is valid. Loading the image at a different address to the link-time address and processing the relocations, however, invalidates any debug data present in the image.

Used on its own, ‑‑reloc makes an image similar to Simple type 1 where the load region attribute is set to RELOC. See Type 1, one load region and contiguous execution regions for more information.

Copyright © 2007 ARM Limited. All rights reserved.ARM DUI 0377A