RealView Linker User Guide

Keil™, An ARM® Company

Version 4.0


Table of Contents

Preface
About this book
Intended audience
Using this book
Typographical conventions
Further reading
Feedback
Feedback on RealView Compilation Tools
Feedback on this book
1. Introduction
1.1. Input to the ARM linker
1.2. Output from the ARM linker
1.2.1. Constructing an executable image
1.2.2. Constructing a partially-linked object
2. Getting Started with the ARM Linker
2.1. Linking models
2.1.1. Bare-metal
2.1.2. Partial linking
2.2. Using command-line options
2.2.1. Invoking the ARM linker
2.2.2. Ordering command-line options
2.2.3. Specifying command-line options with an environment variable
2.2.4. Reading command-line options from a file
3. Using the Basic Linker Functionality
3.1. Specifying the image structure
3.1.1. Building blocks for objects and images
3.1.2. Load view and execution view of an image
3.1.3. Specifying an image memory map
3.1.4. Image entry points
3.2. Section placement
3.2.1. Ordering input sections by attribute
3.2.2. Using FIRST and LAST to place sections
3.2.3. Aligning sections
3.2.4. Ordering execution regions containing Thumb code
3.3. Section elimination
3.3.1. Common debug section elimination
3.3.2. Common group or section elimination
3.3.3. Unused section elimination
3.3.4. Unused virtual function elimination
3.4. Feedback
3.4.1. Example
3.5. RW data compression
3.5.1. Choosing a compressor
3.5.2. How is compression applied?
3.5.3. Working with RW data compression
3.6. Veneers
3.6.1. Veneer sharing
3.6.2. Veneer variants
3.6.3. PI to absolute veneers
3.6.4. Reuse of veneers with overlay execution regions
3.7. Inlining
3.7.1. Factors that influence inlining
3.7.2. Handling tail calling sections
3.8. Using command-line options to create simple images
3.8.1. Type 1, one load region and contiguous execution regions
3.8.2. Type 2, one load region and non-contiguous execution regions
3.8.3. Type 3, two load regions and non-contiguous execution regions
3.9. Using command-line options to handle C++ exceptions
3.10. Getting information about images
3.10.1. Using image-related information
3.11. Library searching, selection, and scanning
3.11.1. Searching for ARM libraries
3.11.2. Searching for user libraries
3.11.3. Scanning the libraries
4. Accessing Image Symbols
4.1. ARM/Thumb synonyms
4.2. Accessing linker-defined symbols
4.2.1. Region-related symbols
4.2.2. Section-related symbols
4.3. Accessing symbols in another image
4.3.1. Creating a symdefs file
4.3.2. Reading a symdefs file
4.3.3. Symdefs file format
4.4. Hiding and renaming global symbols
4.4.1. Steering file format
4.5. Using $Super$$ and $Sub$$ to override symbol definitions
5. Using Scatter-loading Description Files
5.1. About scatter-loading
5.1.1. Symbols defined for scatter-loading
5.1.2. Specifying stack and heap using the scatter-loading description file
5.1.3. When to use scatter-loading
5.1.4. Scatter-loading command-line option
5.1.5. Images with a simple memory map
5.1.6. Images with a complex memory map
5.2. Examples of specifying region and section addresses
5.2.1. Selecting veneer input sections in scatter-loading descriptions
5.2.2. Creating root execution regions
5.2.3. Using overlays to place sections
5.2.4. Assigning sections to a root region
5.2.5. Reserving an empty region
5.2.6. Placing ARM libraries
5.2.7. Creating regions on page boundaries
5.2.8. Using preprocessing directives
5.3. Equivalent scatter-loading descriptions for simple images
5.3.1. Type 1, one load region and contiguous execution regions
5.3.2. Type 2, one load region and non-contiguous execution regions
5.3.3. Type 3, two load regions and non-contiguous execution regions

Proprietary Notice

Words and logos marked with ® or ™ are registered trademarks or trademarks of ARM® Limited in the EU and other countries, except as otherwise stated below in this proprietary notice. Other brands and names mentioned herein may be the trademarks of their respective owners.

Neither the whole nor any part of the information contained in, or the product described in, this document may be adapted or reproduced in any material form except with the prior written permission of the copyright holder.

The product described in this document is subject to continuous developments and improvements. All particulars of the product and its use contained in this document are given by ARM in good faith. However, all warranties implied or expressed, including but not limited to implied warranties of merchantability, or fitness for purpose, are excluded.

This document is intended only to assist the reader in the use of the product. ARM Limited shall not be liable for any loss or damage arising from the use of any information in this document, or any error or omission in such information, or any incorrect use of the product.

Where the term ARM is used it means “ARM or any of its subsidiaries as appropriate”.

Confidentiality Status

This document is Non-Confidential. The right to use, copy and disclose this document may be subject to license restrictions in accordance with the terms of the agreement entered into by ARM and the party that ARM delivered this document to.

Unrestricted Access is an ARM internal classification.

Product Status

The information in this document is final, that is for a developed product.

Revision History
Revision A May 2007 Release for RVCT for µVision v3.1
Revision B December 2008 Release for RVCT for µVision v4.0
ARM KUI 0101A
Non-Confidential