The minus sign ('-') is used as the unary minus operator and as
the subtraction operator.
The unary minus operator is used to change the sign of the
specified operand. If the value of the operand is
positive, the sign is changed to negative. If the value is negative,
it is changed to positive.
The subtraction operator is used to subtract the value of
operand2 from the value of operand1. The specified
operands may be absolute or relocatable. The type of the resulting
expression is determined by the operand types as shown in the
following table:
Operand Types
Resulting Expression Type
absolute - absolute
absolute
absolute - relocatable
Error: Not allowed.
relocatable - absolute
relocatable
relocatable - relocatable
absolute1
1. Relocatable operands are allowed if both are
defined in the same parent section. External operands are not
allowed.
Note
As a general rule, relocatable expressions must evaluate to a
relocatable symbol plus or minus an optional constant value
(displacement).
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.