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.

9.1 About GNU ld script support and restrictions<br />

GNU ld script support in armlink<br />

armlink supports <strong>the</strong> use of GNU ld scripts, but with some restrictions:<br />

• armlink implements a subset of <strong>the</strong> GNU ld script language<br />

• <strong>the</strong> subset is focused on support for <strong>ARM</strong> Linux and partial linking<br />

• Virtual Address (VMA) must equal Load Address (LMA)<br />

• bare-metal support is not supported in this release<br />

• <strong>the</strong> armlink --sysv command-line option uses an internal ld script. --sysv is also <strong>the</strong><br />

default for <strong>the</strong> --arm_linux command-line option.<br />

You specify an ld script with <strong>the</strong> armlink --linker_script ld_script command-line option, or<br />

<strong>the</strong> synonym command-line option -T ld_script.<br />

9.1.1 <strong>Using</strong> ld scripts when linking images and shared objects<br />

To link an image or shared object:<br />

• The --sysv or <strong>the</strong> --arm_linux option is are required.<br />

• Any unrecognized file is parsed as if it is an ld script.<br />

• All ELF images and shared objects produced by an ld script are demand paged. Use <strong>the</strong><br />

--pagesize option to control <strong>the</strong> page size. The default is 0x8000.<br />

9.1.2 <strong>Using</strong> ld scripts when linking partial objects<br />

9.1.3 See also<br />

To link a partial object, you must use <strong>the</strong> armlink --ldpartial command-line option. The -r<br />

command-line option is a synonym for --ldpartial.<br />

Concepts<br />

• Typical use cases for using ld scripts with armlink on page 9-3<br />

• Important ld script commands that are implemented in armlink on page 9-4<br />

• Specific restrictions for using ld scripts with armlink on page 9-6<br />

• Recommendations for using ld scripts with armlink on page 9-7<br />

• Default GNU ld scripts used by armlink on page 9-8.<br />

Reference<br />

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

• --arm_linux on page 2-13<br />

• --ldpartial on page 2-94<br />

• --linker_script=ld_script on page 2-100<br />

• --pagesize=pagesize on page 2-118<br />

• --sysroot=path on page 2-169<br />

• --sysv on page 2-170.<br />

O<strong>the</strong>r information<br />

• <strong>Using</strong> LD The GNU <strong>Linker</strong>.<br />

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

ID080411 Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!