06.02.2013 Views

ARM Compiler toolchain Using the Linker - ARM Information Center

ARM Compiler toolchain Using the Linker - ARM Information Center

ARM Compiler toolchain Using the Linker - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.2 Bare-metal linking model<br />

3.2.1 See also<br />

Linking models supported by armlink<br />

The bare-metal model focuses on <strong>the</strong> conventional embedded market where <strong>the</strong> whole program,<br />

possibly including a Real-Time Operating System (RTOS), is linked in one pass. Very few<br />

assumptions can be made by <strong>the</strong> linker about <strong>the</strong> memory map of a bare metal system.<br />

Therefore, you must use <strong>the</strong> scatter-loading mechanism if you want more precise control.<br />

By default, <strong>the</strong> linker attempts to resolve all <strong>the</strong> relocations statically. However, it is also<br />

possible to create a position-independent or relocatable image. Such an image can be executed<br />

from different addresses and have its relocations resolved at load or run-time. This can be<br />

achieved using a dynamic model.<br />

With this type of model, you can:<br />

• identify <strong>the</strong> regions that can be relocated or are position-independent using a scatter file<br />

or command-line options.<br />

• identify <strong>the</strong> symbols that can be imported and exported using a steering file<br />

• identify <strong>the</strong> shared libraries that are required by <strong>the</strong> ELF file using a steering file.<br />

You can use <strong>the</strong> following options with this model:<br />

• --edit=file_list<br />

• --scatter=file.<br />

You can use <strong>the</strong> following options when scatter-loading is not used:<br />

• --reloc<br />

• --ro_base=address<br />

• --ropi<br />

• --rosplit<br />

• --rw_base=address<br />

• --rwpi<br />

• --split<br />

• --zi_base.<br />

Concepts<br />

• Methods of specifying an image memory map with <strong>the</strong> linker on page 4-8.<br />

Reference<br />

<strong>Linker</strong> Reference:<br />

• --edit=file_list on page 2-53<br />

• --reloc on page 2-132<br />

• --ro_base=address on page 2-135<br />

• --ropi on page 2-136<br />

• --rosplit on page 2-137<br />

• --rw_base=address on page 2-139<br />

• --rwpi on page 2-140<br />

• --scatter=file on page 2-142<br />

• --split on page 2-154<br />

• --zi_base=address on page 2-193<br />

• Chapter 3 <strong>Linker</strong> steering file command reference.<br />

<strong>ARM</strong> DUI 0474C Copyright © 2010-2011 <strong>ARM</strong>. All rights reserved. 3-3<br />

ID080411 Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!