ARM® Compiler toolchain Linker Reference

Version 5.02

List of Topics

Conventions and feedback
Linker command-line options
--add_needed, --no_add_needed
--add_shared_references, --no_add_shared_references
--api, --no_api
--as_needed, --no_as_needed
--autoat, --no_autoat
--bestdebug, --no_bestdebug
--blx_arm_thumb, --no_blx_arm_thumb
--blx_thumb_arm, --no_blx_thumb_arm
--branchnop, --no_branchnop
--callgraph, --no_callgraph
--combreloc, --no_combreloc
--comment_section, --no_comment_section
--compress_debug, --no_compress_debug
--cppinit, --no_cppinit
--crosser_veneershare, --no_crosser_veneershare
--debug, --no_debug
--eager_load_debug, --no_eager_load_debug
--exceptions, --no_exceptions
--execstack, --no_execstack
--export_all, --no_export_all
--export_dynamic, --no_export_dynamic
--filtercomment, --no_filtercomment
--force_so_throw, --no_force_so_throw
--import_unresolved, --no_import_unresolved
--inline, --no_inline
--inlineveneer, --no_inlineveneer
--largeregions, --no_largeregions
--legacyalign, --no_legacyalign
--list_mapping_symbols, --no_list_mapping_symbols
--load_addr_map_info, --no_load_addr_map_info
--locals, --no_locals
--mangled, --unmangled
--map, --no_map
--merge, --no_merge
--muldefweak, --no_muldefweak
--piveneer, --no_piveneer
--prelink_support, --no_prelink_support
--project=filename, --no_project
--reduce_paths, --no_reduce_paths
--ref_cpp_init, --no_ref_cpp_init
--remove, --no_remove
--scanlib, --no_scanlib
--search_dynamic_libraries, --no_search_dynamic_libraries
--startup=symbol, --no_startup
--strict_enum_size, --no_strict_enum_size
--strict_flags, --no_strict_flags
--strict_ph, --no_strict_ph
--strict_relocations, --no_strict_relocations
--strict_symbols, --no_strict_symbols
--strict_visibility, --no_strict_visibility
--strict_wchar_size, --no_strict_wchar_size
--symbols, --no_symbols
--tailreorder, --no_tailreorder
--thumb2_library, --no_thumb2_library
--use_sysv_default_script, --no_use_sysv_default_script
--veneershare, --no_veneershare
--xref, --no_xref
--xrefdbg, --no_xrefdbg
Linker steering file command reference
Formal syntax of the scatter file
BNF notation used in scatter-loading description syntax
Syntax of a scatter file
About load region descriptions
Syntax of a load region description
Load region attributes
About execution region descriptions
Syntax of an execution region description
Execution region attributes
Address attributes for load and execution regions
Considerations when using a relative address +offset for load regions
Considerations when using a relative address +offset for execution regions
Inheritance rules for load region address attributes
Inheritance rules for execution region address attributes
Inheritance rules for the RELOC address attribute
About input section descriptions
Syntax of an input section description
How the linker resolves multiple matches when processing scatter files
Behavior when .ANY sections overflow because of linker-generated content
How the linker resolves path names when processing scatter files
About Expression evaluation in scatter files
Expression usage in scatter files
Expression rules in scatter files
Execution address built-in functions for use in scatter files
Scatter files containing relative base address load regions and a ZI execution region
ScatterAssert function and load address related functions
Symbol related function in a scatter file
Example of aligning a base address in execution space but still tightly packed in load space
AlignExpr(expr, align) function
GetPageSize() function
SizeOfHeaders() function
Revisions for the Linker Reference

Proprietary Notice

Words and logos marked with ® or ™ are registered trademarks or trademarks of ARM 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 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 A28 May 2010ARM Compiler toolchain v4.1 Release
Revision B30 September 2010Update 1 for ARM Compiler toolchain v4.1
Revision C28 January 2011Update 2 for ARM Compiler toolchain v4.1 Patch 3
Revision D30 April 2011ARM Compiler toolchain v5.0 Release
Revision E29 July 2011Update 1 for ARM Compiler toolchain v5.0
Revision F30 September 2011ARM Compiler toolchain v5.01 Release
Revision G29 February 2012Document update 1 for ARM Compiler toolchain v5.01 Release
Revision H27 July 2012ARM Compiler toolchain v5.02 Release
Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0493H