ARM image format


At its simplest, a file in ARM Image Format (AIF) is a plain binary image preceded by a small (128 byte) header which describes what follows.

At its most sophisticated, AIF can be considered to be a collection of envelopes which enwrap a plain binary image, as follows:

Two flavours of AIF are supported:

An executable AIF image is loaded at its load address (which may be arbitrary if the image is relocatable), and entered at the same address. Eventually, control passes to a branch to the image's entry point.

In order to produce an AIF output there must be:

The AIF header is specified fully in The layout of AIF.

The contents of some fields of the AIF header (such as the program exit instruction) can be customised by providing a template for the header in an area with the name AIF_HDR and a length of 128 bytes, in the first object module in the list of object modules given to armlink.

Similarly, the self-move and self-relocation code appended by the linker to a relocatable AIF image can customised by providing an area with the name AIF_RELOC, also in the first object module in the input list.