You copied the Doc URL to your clipboard.

Bare-metal linking model

The bare-metal model focuses on the conventional embedded market where the whole program, possibly including a Real-Time Operating System (RTOS), is linked in one pass. Very few assumptions can be made by the linker about the memory map of a bare metal system. Therefore, you must use the scatter-loading mechanism if you want more precise control.

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. This can be achieved using a dynamic model.

With this type of 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

  • identify the shared libraries that are required by the ELF file using a steering file.

You can use the following options with this model:

  • --edit=file_list

  • --scatter=file.

You can use the following options when scatter-loading is not used:

  • --reloc

  • --ro_base=address

  • --ropi

  • --rosplit

  • --rw_base=address

  • --rwpi

  • --split

  • --zi_base.