Keil Logo

Bare-metal linking model

2.2 Bare-metal linking model

Focuses on the conventional embedded market where the whole program, possibly including a Real-Time Operating System (RTOS), is linked in one pass.

The linker can make very few assumptions about the memory map of a bare-metal system. Therefore, you must use the scatter-loading mechanism if you want more precise control. Scatter-loading allows different regions in an image memory map to be placed at addresses other than at their natural address. Such an image is a relocatable image, and the linker must adjust program addresses and resolve references to external symbols.
By default, the linker attempts to resolve all the relocations statically. However, it is also possible to create a position-independent or relocatable image. Such an image can be executed from different addresses and have its relocations resolved at load or run-time. You can use a dynamic model to create relocatable images. A position-independent image does not require a dynamic model.
With the bare-metal model, you can:
  • Identify the regions that can be relocated or are position-independent using a scatter file or command-line options.
  • Identify the symbols that can be imported and exported using a steering file.
You can use --scatter=file with this model.
You can use the following options when scatter-loading is not used:
  • --reloc.
  • --ro_base=address.
  • --ropi.
  • --rosplit.
  • --rw_base=address.
  • --rwpi.
  • --split.
  • --xo_base=address.
  • --zi_base.


--xo_base cannot be used with --ropi or --rwpi.
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.