3.5.5. Labels

Labels are symbols representing the addresses in memory of instructions or data. They can be program-relative, register-relative, or absolute. Labels are local to the source file unless you make them global using the EXPORT directive, see EXPORT or GLOBAL.

Program-relative labels

These represent the PC, plus or minus a numeric constant. Use them as targets for branch instructions, or to access small items of data embedded in code sections. You can define program-relative labels using a label on an instruction or on one of the data definition directives. See:

You can also use the section name of an AREA directive as a label for program-relative addresses. In this case the label points to the start of the specified AREA, see AREA. Do not use AREA names as branch targets.

Register-relative labels

These represent a named register plus a numeric constant. They are most often used to access data in data sections. You can define them with a storage map. You can use the EQU directive to define additional register-relative labels, based on labels defined in storage maps. See:

Absolute addresses

These are numeric constants. They are integers in the range 0 to 232-1. They address the memory directly.

Copyright © 2002-2010 ARM. All rights reserved.ARM DUI 0204J