Datasheet

Creating an Application
3-18 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0064D
The default output from the linker is a non-relocatable image where the code starts at
0x8000
and the data section is placed immediately after the code. You can specify
exactly where the code and data sections are located by using linker options or a
scatter-load description file.
Linker input and output
Input to armlink consists of:
one or more object files in ELF Object Format
optionally, one or more libraries created by armar.
Output from a successful invocation of armlink is one of the following:
an executable image in ELF executable format
a partially linked object in ELF object format.
For simple images, ELF executable files contain segments that are approximately
equivalent to RO and RW output sections in the image. An ELF executable file also has
ELF sections that contain the image output sections.
An executable image in ELF executable format can be converted to other file formats
by using the fromELF utility.
Linker syntax
The linker command syntax is of the form:
armlink [-help_options] [-output_options] [-via_options] [-memory_map_options]
[-image_content_options] [[-image_info_options]] [-diagnostic_options]
See the ADS Linker and Utilities Guide for a detailed list of the linker options.
Using linker options to position sections
The following linker options control how sections are arranged in the final image and
whether the code and data can be moved to a new location after the application starts:
-ropi
This option makes the load and execution region containing the RO
output section position-independent. If this option is not used the region
is marked as absolute.
-ro-base address
This option sets the execution addresses of the region containing the RO
output section at
address
. The default address is
0x8000
.