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.

7.12 Image symbols<br />

7.12.1 See also<br />

Accessing and managing symbols with armlink<br />

Image symbols are generated by <strong>the</strong> linker when you use a command-line option to create a<br />

simple image.<br />

The following table shows <strong>the</strong> image symbols:<br />

Symbol Section type Description<br />

If you are using a scatter file, <strong>the</strong> image symbols are undefined. If your code accesses any of<br />

<strong>the</strong>se symbols, you must treat <strong>the</strong>m as a weak reference.<br />

The standard implementation of __user_setup_stackheap() uses <strong>the</strong> value in Image$$ZI$$Limit.<br />

Therefore, if you are using a scatter file you must manually place <strong>the</strong> stack and heap. You can<br />

do this ei<strong>the</strong>r:<br />

• in a scatter file using one of <strong>the</strong> following methods:<br />

— define separate stack and heap regions called <strong>ARM</strong>_LIB_STACK and <strong>ARM</strong>_LIB_HEAP<br />

— define a combined region containing both stack and heap called <strong>ARM</strong>_LIB_STACKHEAP.<br />

• by re-implementing __user_setup_stackheap() to set <strong>the</strong> heap and stack boundaries.<br />

Tasks<br />

• <strong>Linker</strong>-defined symbols that are not defined when scatter-loading on page 8-11<br />

• Specifying stack and heap using <strong>the</strong> scatter file on page 8-12.<br />

Concepts<br />

• Types of simple image on page 4-10<br />

• About weak references and definitions on page 4-32.<br />

Migration and Compatibility:<br />

• C and C++ library changes between RVCT v2.2 and RVCT v3.0 on page 9-5.<br />

Reference<br />

<strong>Using</strong> <strong>ARM</strong> ® C and C++ Libraries and Floating-Point Support:<br />

• __user_setup_stackheap() on page 2-60.<br />

Table 7-4 Image symbols<br />

Image$$RO$$Base Output Address of <strong>the</strong> start of <strong>the</strong> RO output section.<br />

Image$$RO$$Limit Output Address of <strong>the</strong> first byte beyond <strong>the</strong> end of <strong>the</strong><br />

RO output section.<br />

Image$$RW$$Base Output Address of <strong>the</strong> start of <strong>the</strong> RW output section.<br />

Image$$RW$$Limit Output Address of <strong>the</strong> byte beyond <strong>the</strong> end of <strong>the</strong> ZI<br />

output section. (The choice of <strong>the</strong> end of <strong>the</strong> ZI<br />

region ra<strong>the</strong>r than <strong>the</strong> end of <strong>the</strong> RW region is to<br />

maintain compatibility with legacy code.)<br />

Image$$ZI$$Base Output Address of <strong>the</strong> start of <strong>the</strong> ZI output section.<br />

Image$$ZI$$Limit Output Address of <strong>the</strong> byte beyond <strong>the</strong> end of <strong>the</strong> ZI<br />

output section.<br />

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

ID080411 Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!