1.1 About the linker
The linker combines the contents of one or more object files with selected parts of one or more object
libraries to produce executable images, partially linked object files, or shared object files.
This section contains the following subsections:
• 1.1.1 Summary of the linker features on page 1-16.
• 1.1.2 What the linker can accept as input on page 1-17.
• 1.1.3 What the linker outputs on page 1-17.
1.1.1 Summary of the linker features
The linker has many features for linking input files to generate various types of output files.
The linker can:
• Link A32 and T32 code, or A64 code.
• Generate interworking veneers to switch between A32 and T32 states when required.
• Generate range extension veneers, where required, to extend the range of branch instructions.
• Automatically select the appropriate standard C or C++ library variants to link with, based on the
build attributes of the objects it is linking.
• Position code and data at specific locations within the system memory map, using either a command-
line option or a scatter file.
• Perform RW data compression to minimize ROM size.
• Eliminate unused sections to reduce the size of your output image.
• Control the generation of debug information in the output file.
• Generate a static callgraph and list the stack usage.
• Control the contents of the symbol table in output images.
• Show the sizes of code and data in the output.
• Build images suitable for all states of the Armv8-M Security Extension.
Note
Be aware of the following:
• Generated code might be different between two Arm Compiler releases.
• For a feature release, there might be significant code generation differences.
Note
The command-line option descriptions and related information in the individual Arm Compiler tools
documents describe all the features that Arm Compiler supports. Any features not documented are not
supported and are used at your own risk. You are responsible for making sure that any generated code
using community features on page 1-21 is operating correctly.
Related concepts
3.4 Linker support for creating demand-paged files on page 3-51.
7.6 Placement of CMSE veneer sections for a Secure image on page 7-141.
Related references
Chapter 2 Linking Models Supported by armlink on page 2-24.
Chapter 3 Image Structure and Generation on page 3-32.
Chapter 4 Linker Optimization Features on page 4-65.
Chapter 5 Getting Image Details on page 5-81.
Chapter 6 Accessing and Managing Symbols with armlink on page 6-87.
Chapter 7 Scatter-loading Features on page 7-104.
1 Overview of the Linker
1.1 About the linker
DUI0803I Copyright © 2014–2017 Arm Limited (or its affiliates). All rights reserved. 1-16
Non-Confidential