Keil Logo

Methods of importing linker-defined symbols in ARM assembly language

6.3.8 Methods of importing linker-defined symbols in ARM® assembly language

You can import linker-defined symbols into your ARM® assembly code.

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$$ER_ZI$$Limit|
         …
zi_limit DCD |Image$$ER_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 ARM and Thumb, and the architecture you are using.
Non-ConfidentialPDF file icon PDF versionARM DUI0377H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  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.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.