Variables, Expressions, and Integrals

In a linker command file, all symbol names must start with the underscore character (_). The other characters can be letters, digits, or underscores. These valid lines for an LCF assign values to two symbols:

  _dec_num = 99999999;
  
  
  _hex_num_ = 0x9011276;
  
  

Use the standard assignment operator to create global symbols and assign their addresses, according to the pattern:

  _symbolicname = some_expression;
  
  
Note: There must be a semicolon at the end of a symbol assignment statement. A symbol assignment is valid only at the start of an expression, so a line such as this is not valid: _sym1 + _sym2 = _sym3;

When the system evaluates an expression and assigns it to a variable, the expression receives the type value absolute or a relocatable:

LCF syntax for expressions is very similar to the syntax of the C programming language: