RealView ® CompilationTools Linker and Utilities Guide

Version 2.2


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. About RVCT
1.1.1. Using the examples
1.2. About the linker and utilities
1.2.1. armlink
1.2.2. fromelf
1.2.3. armar
1.2.4. Compatibility with legacy objectsand libraries
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. Specifying ByteAddressing mode
2.2.10. Generating image-relatedinformation
2.2.11. Controlling linkerdiagnostics
2.2.12. Using a via file
2.2.13. 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 complexmemory 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 placesections
5.3.5. Assigning sectionsto 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, one load region and contiguousoutput regions
5.4.2. Type 2, one load region and non-contiguousoutput regions
5.4.3. Type 3 , two load regions and non-contiguousoutput regions
6. System V Shared Libraries
6.1. Introduction
6.1.1. Getting more information
6.2. Using SVr4 shared libraries
6.2.1. Building an ARMLinux executable
6.2.2. Accessing symbols
6.2.3. Exception tables
6.2.4. Using a dynamic linker
7. Creating and Using Libraries
7.1. About libraries
7.2. Library searching, selection, andscanning
7.2.1. Searching for ARM libraries
7.2.2. Searching for userlibraries
7.2.3. Scanning the libraries
7.3. The ARM librarian
7.3.1. Librarian command-line options
7.3.2. Examples of armar usage
8. Using fromelf
8.1. About fromelf
8.1.1. Image structure
8.2. fromelf command syntax
8.3. Examples of fromelf usage
8.3.1. Producing a plain binary file
8.3.2. Disassembly
8.3.3. Listing field offsets as assemblylanguage EQUs
8.3.4. Listing addresses of static data
8.3.5. Converting debugto no debug
Glossary

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.

ConfidentialityStatus

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 A August2002 Release 1.2
Revision B January2003 Release 2.0
Revision C September2003 Release 2.0.1 for RVDS v2.0
Revision D January2004 Release 2.1 for RVDS v2.1
Revision E December2004 Release 2.2 for RVDS v2.2
Revision F May2005 Release 2.2 for RVDS v2.2 SP1
Copyright © 2002-2005 ARM Limited. All rights reserved. ARM DUI 0206F
Non-Confidential