RealView ® DeveloperKit Linker and Utilities Guide

Version 2.2

Table of Contents

About this book
Intended audience
Using this book
Typographical conventions
Further reading
Feedback on RealView Developer Kit
Feedback on this book
1. Introduction
1.1. About RVDK
1.1.1. Using the examples
1.2. About the linker and utilities
1.2.1. The linker
1.2.2. fromelf
1.2.3. armar
2. The Linker Command Syntax
2.1. About armlink
2.1.1. Input to armlink
2.1.2. Output from armlink
2.1.3. Summary of linkeroptions
2.2. armlink command syntax
2.2.1. Accessing help andinformation
2.2.2. Specifying an input file list
2.2.3. Controlling linker behavior
2.2.4. Specifying the output type and theoutput filename
2.2.5. Specifying memorymap information for the image
2.2.6. Controlling debug information
2.2.7. Controlling image contents
2.2.8. Controlling veneergeneration
2.2.9. Generating image-relatedinformation
2.2.10. Controlling linkerdiagnostics
2.2.11. Using a via file
2.2.12. Controlling compatibility with legacyobjects
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 animage
3.1.3. Specifying an image memory map
3.1.4. Image entry points
3.2. Section placement
3.2.1. Ordering input sectionsby attribute
3.2.2. Using FIRST andLAST to place sections
3.2.3. Aligning sections
3.2.4. Ordering execution regions containingThumb code
3.3. Optimizations and modifications
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.3.5. Linker feedback
3.3.6. RW data compression
3.3.7. Veneer generation
3.3.8. Reuse of veneers with overlay executionregions
3.3.9. Branch inlining
3.4. Using command-line options to createsimple images
3.4.1. Type 1: one load region and contiguousoutput regions
3.4.2. Type 2: one loadregion and non-contiguous output regions
3.4.3. Type 3: two load regionsand non-contiguous output regions
3.5. Using command-line options to handleC++ exceptions
3.6. Getting information about images
3.6.1. Column details
3.6.2. Row details
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-relatedsymbols
4.2.3. Importing linker-defined 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.4.2. Steering file commands
4.5. Using $Super$$ and $Sub$$ to overridesymbol definitions
4.6. Symbol versioning
4.6.1. Version
4.6.2. Default version
4.6.3. Creating versionedsymbols
5. Using Scatter-loading Description Files
5.1. About scatter-loading
5.1.1. Symbols defined for scatter-loading
5.1.2. When to use scatter-loading
5.1.3. Scatter-loading command-line option
5.1.4. Images with a simple memory map
5.1.5. Images with a complex memory map
5.2. Formal syntax of the scatter-loadingdescription file
5.2.1. BNF notation and syntax
5.2.2. Overview of the syntax of scatter-loadingdescription files
5.2.3. Load region description
5.2.4. Execution region description
5.2.5. Input section description
5.2.6. Resolving multiplematches
5.3. Examples of specifying region andsection addresses
5.3.1. Selecting veneer input sections inscatter-loading descriptions
5.3.2. Creating root executionregions
5.3.3. Placing regions at fixed addresses
5.3.4. Using overlays to place sections
5.3.5. Assigning sections to a root region
5.3.6. Reserving an empty region
5.3.7. Using preprocessing directives
5.4. Equivalent scatter-loading descriptionsfor simple images
5.4.1. Type 1
5.4.2. Type 2
5.4.3. Type 3
6. Creating and Using Libraries
6.1. About libraries
6.2. Library searching, selection, andscanning
6.2.1. Searching for ARM libraries
6.2.2. Searching for userlibraries
6.2.3. Scanning the libraries
6.3. The ARM librarian
6.3.1. Librarian command-line options
6.3.2. Examples of armar usage
7. Using fromelf
7.1. About fromelf
7.1.1. Image structure
7.2. fromelf command syntax
7.3. Examples of fromelf usage
7.3.1. Producing a plain binary file
7.3.2. Listing addresses of static data

Proprietary Notice

Words and logos marked with ® or ™ are registered trademarks or trademarksowned by ARM Limited. Other brands and names mentioned herein maybe the trademarks of their respective owners.

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

The product described in this document is subject to continuousdevelopments and improvements. All particulars of the product andits use contained in this document are given by ARM in good faith.However, all warranties implied or expressed, including but notlimited to implied warranties of merchantability, or fitness forpurpose, are excluded.

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


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

Product Status

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

Revision History
Revision B April2005 Release for RVDK v2.2
Copyright © 2005 ARM Limited. All rights reserved. ARM DUI 0285B