You copied the Doc URL to your clipboard.

Importing linker-defined symbols in ARM assembly language

To import linker-defined symbols into your assembly language source code, use the IMPORT directive.

32-bit applications

Create a 32-bit data word to hold the value of the symbol, for example:

        IMPORT |Image$$ZI$$Limit|
...
zi_limit DCD |Image$$ZI$$Limit|

To load the value into a register, such as r1, use the LDR instruction:

        LDR r1, zi_limit

The LDR instruction must be able to reach the 32-bit data word. The accessible memory range varies between A32 and T32, and the architecture you are using.

64-bit applications

Create a 64-bit data doubleword to hold the value of the symbol, for example:

        IMPORT |Image$$ZI$$Limit|
...
zi_limit DCQ |Image$$ZI$$Limit|

To load the value into a register, such as x1, use the LDR instruction:

        LDR x1, zi_limit

The LDR instruction must be able to reach the 64-bit data word.

See also

Was this page helpful? Yes No