Keil Logo Arm Logo

Relocatable Expressions

Relocatable expressions are so named because they contain a reference to a relocatable or external symbol. These types of expressions can only be partially calculated by the assembler since the assembler does not know the final location of relocatable segments. The final calculations are performed by the linker.

A relocatable expression normally contains only a relocatable symbol, however, it may contain other operands and operators as well. A relocatable symbol can be modified by adding or subtracting a constant value.

Examples for valid relocatable expression

  • relocatable_symbol + absolute_expression
  • relocatable_symbol - absolute_expression
  • absolute_expression + relocatable_symbol

There are two basic types of relocatable expressions: simple relocatable expressions and extended relocatable expressions.

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.