RealView® Compilation Tools Linker and Utilities Guide

Version 3.1

Table of Contents

About this book
Intended audience
Using this book
Typographical conventions
Further reading
Feedback on RealView Compilation Tools
Feedback on this book
1. Introduction
1.1. armlink
1.2. armar
1.3. fromelf
1.4. Compatibility with legacy objects and 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. Ordering command-line options
2.1.4. Specifying command-line options with an environment variable
2.2. armlink command syntax
2.2.1. Accessing help and information
2.2.2. Project template options
2.2.3. Specifying an input file list
2.2.4. Controlling linker behavior
2.2.5. Specifying the output type and the output filename
2.2.6. Specifying memory map information for the image
2.2.7. Controlling debug information
2.2.8. Controlling image contents
2.2.9. Controlling veneer generation
2.2.10. Specifying Byte Addressing mode
2.2.11. Generating image-related information
2.2.12. Controlling linker diagnostics
2.2.13. Using a via file
2.2.14. Miscellaneous
2.2.15. Controlling compatibility with legacy objects
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. 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 function elimination
3.3.5. Linker feedback
3.3.6. RW data compression
3.3.7. PI to absolute veneers
3.3.8. Veneer generation
3.3.9. Reuse of veneers with overlay execution regions
3.3.10. Branch inlining
3.4. Using command-line options to create simple images
3.4.1. Type 1, one load region and contiguous execution regions
3.4.2. Type 2, one load region and non contiguous execution regions
3.4.3. Type 3, two load regions and non contiguous execution regions
3.5. Using command-line options to handle C++ exceptions
3.6. Getting information about images
3.6.1. Using image-related information
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.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 override symbol definitions
4.6. Symbol versioning
4.6.1. Version
4.6.2. Default version
4.6.3. Creating versioned symbols
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. Formal syntax of the scatter-loading description file
5.2.1. BNF notation and syntax
5.2.2. Overview of the syntax of scatter-loading description files
5.2.3. Load region description
5.2.4. Execution region description
5.2.5. Input section description
5.2.6. Resolving multiple matches
5.2.7. Resolving path names
5.2.8. Expression evaluation in scatter-loading files
5.3. Examples of specifying region and section addresses
5.3.1. Selecting veneer input sections in scatter-loading descriptions
5.3.2. Creating root execution regions
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. Placing ARM libraries
5.3.8. Creating regions on page boundaries
5.3.9. Using preprocessing directives
5.4. Equivalent scatter-loading descriptions for simple images
5.4.1. Type 1, one load region and contiguous execution regions
5.4.2. Type 2, one load region and non contiguous execution regions
5.4.3. Type 3, two load regions and non contiguous execution regions
6. BPABI and System V Shared Libraries and Executables
6.1. The Base Platform ABI
6.1.1. Getting more information
6.2. Using BPABI shared libraries and executables
6.2.1. About the BPABI
6.2.2. Symbol import and export
6.2.3. Symbol visibility
6.2.4. Symbol Versioning
6.2.5. Memory map
6.3. Using SVr4 shared libraries and executables
6.3.1. Building an ARM Linux executable
6.3.2. Accessing symbols
6.3.3. Exception tables
6.3.4. Thread Local Storage
6.3.5. Using a dynamic linker
7. Using the ARM Librarian
7.1. About libraries
7.2. Library searching, selection, and scanning
7.2.1. Searching for ARM libraries
7.2.2. Searching for user libraries
7.2.3. Scanning the libraries
7.3. The ARM librarian
7.3.1. Librarian command-line options
7.3.2. Ordering command-line options
7.3.3. Examples of armar usage
8. Using fromelf
8.1. About fromelf
8.1.1. Image structure
8.1.2. Ordering command-line options
8.2. fromelf command syntax
8.2.1. ‑‑base n
8.2.2. code_output_format
8.2.3. --continue_on_error
8.2.4. --decode_build_attributes
8.2.5. ‑‑debugonly
8.2.6. ‑‑diag_style arm|ide|gnu
8.2.7. ‑‑diag_suppress taglist
8.2.8. --dump_build_attributes
8.2.9. ‑‑expandarrays
8.2.10. --extract_build_attributes
8.2.11. ‑‑fieldoffsets
8.2.12. ‑‑help
8.2.13. input_file
8.2.14. memory_config
8.2.15. ‑‑no_debug
8.2.16. ‑‑no_linkview
8.2.17. ‑‑no_symbolversions
8.2.18. ‑‑output output_file
8.2.19. ‑‑privacy
8.2.20. Project template options
8.2.21. ‑‑select select_options
8.2.22. ‑‑show_cmdline
8.2.23. ‑‑strip option [, option]
8.2.24. ‑‑text
8.2.25. ‑‑vsn
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 assembly language EQUs
8.3.4. Listing addresses of static data
8.3.5. Converting debug to no debug

Proprietary Notice

Words and logos marked with ® or ™ are registered trademarks or trademarks owned by ARM Limited. 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.

Product Status

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

Revision History
Revision AAugust 2002Release 1.2
Revision BJanuary 2003Release 2.0
Revision CSeptember 2003Release 2.0.1 for RVDS v2.0
Revision DJanuary 2004Release 2.1 for RVDS v2.1
Revision EDecember 2004Release 2.2 for RVDS v2.2
Revision FMay 2005Release 2.2 for RVDS v2.2 SP1
Revision GMarch 2006Release 3.0 for RVDS v3.0
Revision HMarch 2007Release 3.1 for RVDS v3.1
Copyright © 2002-2007 ARM Limited. All rights reserved.ARM DUI 0206H