# Special options

The options -Base, -Entry, -DATA and -Workspace are each followed by a numerical argument. You can use a 0x or & prefix to indicate a hexadecimal value, and the suffixes K and M to indicate multiplication by 1024 and 1024 x 1024, respectively.

The default base address for an AIF image is &8000 (=32K, =0x20K). The default base address for a binary image (-BIN, -BIN -AIF, and -IHF) is 0.

`-RO-base <base-address> -Base <base-address>`

Set the base address for the output to base-address. This is the address at which an image may be loaded and executed without further relocation. If there are separate read-only and read-write sections then this is the base of the read-only section.

`-RW-base` <`data-base-address`> `-DATA` <`data-base-address`>

Set the base for the data (read-write) segment of the output to data-base-address rather than to base-address + code-size. Currently, this option is only meaningful if the output type is -BIN -AIF, -BIN -SPLIT or -IHF -SPLIT.

`-Entry <entry-address> -Entry <offset+object(area)>`

The objects included in an image must have a unique designated entry point. Usually, this is given by one of the input areas having been assembled from a source containing an ENTRY directive. Otherwise, the entry point must be given on the linker's command line. The entry point is the target of the entry branch from the image's AIF header.

The entry point may be given as an absolute address or as an offset within an area within a particular object. For example:

``

    -Entry 8+startup(C$$code)

(Note that there must be no spaces within the argument to -Entry and that letter case is ignored when matching both object and area names).

This latter form is often more convenient and is mandatory when specifying an entry point for unused area elimination (see -NOUNUSEDareas).

`-Case`

Make the matching of symbol names case insensitive.

`-MATCH <flags>`

Set the last-gasp symbol matching options and the pc-relative implies code relocation default. Each option is controlled by a single bit in flags, as follows:

    --------------------------------------------------------
    Flag  |Description
    --------------------------------------------------------
    0x01: |match an undefined symbol of the form _sym to a
          |symbol definition of the form sym;
    --------------------------------------------------------
    0x02: |match an undefined symbol of the form sym to a
          |symbol definition of the form_sym;
    --------------------------------------------------------
    0x04: |match an undefined symbol of the form
          |Module_Symbol to a definition of the form
          |Module.Symbol;
    --------------------------------------------------------
    0x08: |match an undefined symbol of the form
          |symbol__type to a definition of the form  symbol;
    --------------------------------------------------------
    0x10: |treat all pc-relative relocation directives as
          |relocating instructions.
    --------------------------------------------------------

These options are usually set by configuring the armlink image when it is installed. The default value is 0x10 (treat pc-relative relocations as relocating code but do no default symbol matching). Care must be taken when using -MATCH from the command line not to override options accidentally.

`-FIRST <object(area)> -LAST <object(area)>`

Place the area named area from the object named object first or last, respectively, in the output. These options are useful for forcing an area mapping low addresses (typically the reset and interrupt vector addresses) to be placed first, or an area containing a checksum to be placed last.

`-NOUNUSEDareas`

Do not remove unused areas from the output (output of type AIF only). An area is used if:

- it is the area containing the entry point;
- it is referred to from a used area.

(An area X refers to an area Y if any value in X is relocated relative to the base of Y or relative to any symbol defined in Y. That is, if there is any symbolic reference from X to Y).

`-Unresolved <symbol>`

Match each reference to an undefined symbol to the global definition of symbol. Note that symbol must be both defined and global, otherwise it too will appear in the list of undefined symbols, and the link step will fail. This option is particularly useful during top-down development, when it may be possible to test a partially implemented system from which the lower levels of code are missing, by connecting each reference to a missing function to a dummy function which does nothing.