RealView® Compilation Tools Linker Reference Guide

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. The ARM linker
1.2. Compatibility with legacy objects and libraries
2. Linker Command-line Options
2.1. Command-line options listed alphabetically
2.1.1. --add_needed, --no_add_needed
2.1.2. --add_shared_references, --no_add_shared_references
2.1.3. --any_contingency
2.1.4. --any_placement=algorithm
2.1.5. --any_sort_order=order
2.1.6. --arm_linux
2.1.7. --arm_only
2.1.8. --as_needed, --no_as_needed
2.1.9. --autoat, --no_autoat
2.1.10. --base_platform
2.1.11. --be8
2.1.12. --be32
2.1.13. --bestdebug, --no_bestdebug
2.1.14. --bpabi
2.1.15. --branchnop, --no_branchnop
2.1.16. --callgraph, --no_callgraph
2.1.17. --callgraph_file=filename
2.1.18. --callgraph_output=fmt
2.1.19. --cgfile=type
2.1.20. --cgsymbol=type
2.1.21. --cgundefined=type
2.1.22. --combreloc, --no_combreloc
2.1.23. --comment_section, --no_comment_section
2.1.24. --compress_debug, --no_compress_debug
2.1.25. --cppinit, --no_cppinit
2.1.26. --cpu=list
2.1.27. --cpu=name
2.1.28. --crosser_veneershare, --no_crosser_veneershare
2.1.29. --datacompressor=opt
2.1.30. --debug, --no_debug
2.1.31. --device=list
2.1.32. --device=name
2.1.33. --diag_error=tag[,tag,...]
2.1.34. --diag_remark=tag[,tag,...]
2.1.35. --diag_style=arm|ide|gnu
2.1.36. --diag_suppress=tag[,tag,...]
2.1.37. --diag_warning=tag[,tag,...]
2.1.38. --dll
2.1.39. --dynamic_debug
2.1.40. --dynamic_linker=name
2.1.41. --eager_load_debug, --no_eager_load_debug
2.1.42. --edit=file_list
2.1.43. --emit_debug_overlay_relocs
2.1.44. --emit_debug_overlay_section
2.1.45. --emit_non_debug_relocs
2.1.46. --emit_relocs
2.1.47. --entry=location
2.1.48. --errors=file
2.1.49. --exceptions, --no_exceptions
2.1.50. --exceptions_tables=action
2.1.51. --execstack, --no_execstack
2.1.52. --export_all, --no_export_all
2.1.53. --export_dynamic, --no_export_dynamic
2.1.54. --feedback=file
2.1.55. --feedback_image=option
2.1.56. --feedback_type=type
2.1.57. --filtercomment, --no_filtercomment
2.1.58. --fini=symbol
2.1.59. --first=section_id
2.1.60. --force_explicit_attr
2.1.61. --force_so_throw, --no_force_so_throw
2.1.62. --fpic
2.1.63. --fpu=list
2.1.64. --fpu=name
2.1.65. --gnu_linker_defined_syms
2.1.66. --help
2.1.67. --import_unresolved, --no_import_unresolved
2.1.68. --info=topic[,topic,...]
2.1.69. --info_lib_prefix=opt
2.1.70. --init=symbol
2.1.71. --inline, --no_inline
2.1.72. --inlineveneer, --no_inlineveneer
2.1.73. input_file_list
2.1.74. --keep=section_id
2.1.75. --keep_protected_symbols
2.1.76. --largeregions, --no_largeregions
2.1.77. --last=section_id
2.1.78. --legacyalign, --no_legacyalign
2.1.79. --libpath=pathlist
2.1.80. --library=name
2.1.81. --library_type=lib
2.1.82. --licretry
2.1.83. --linux_abitag=version_id
2.1.84. --list=file
2.1.85. --list_mapping_symbols, --no_list_mapping_symbols
2.1.86. --load_addr_map_info, --no_load_addr_map_info
2.1.87. --locals, --no_locals
2.1.88. --ltcg
2.1.89. --mangled, --unmangled
2.1.90. --map, --no_map
2.1.91. --match=crossmangled
2.1.92. --max_veneer_passess=value
2.1.93. --max_visibility=type
2.1.94. --merge, --no_merge
2.1.95. --muldefweak, --no_muldefweak
2.1.96. --output=file
2.1.97. --override_visibility
2.1.98. --pad=num
2.1.99. --partial
2.1.100. --piveneer, --no_piveneer
2.1.101. --pltgot=type
2.1.102. --pltgot_opts=mode
2.1.103. --predefine=”string”
2.1.104. --prelink_support, --no_prelink_support
2.1.105. --privacy
2.1.106. --profile=filename
2.1.107. --project=filename, --no_project
2.1.108. --reduce_paths, --no_reduce_paths
2.1.109. --ref_cpp_init, --no_ref_cpp_init
2.1.110. --reinitialize_workdir
2.1.111. --reloc
2.1.112. --remarks
2.1.113. --remove, --no_remove
2.1.114. --ro_base=address
2.1.115. --ropi
2.1.116. --rosplit
2.1.117. --runpath=pathlist
2.1.118. --rw_base=address
2.1.119. --rwpi
2.1.120. --scanlib, --no_scanlib
2.1.121. --scatter=file
2.1.122. --search_dynamic_libraries, --no_search_dynamic_libraries
2.1.123. --section_index_display=type
2.1.124. --shared
2.1.125. --show_cmdline
2.1.126. --soname=name
2.1.127. --sort=algorithm
2.1.128. --split
2.1.129. --startup=symbol, --no_startup
2.1.130. --strict
2.1.131. --strict_enum_size, --no_strict_enum_size
2.1.132. --strict_flags, --no_strict_flags
2.1.133. --strict_ph, --no_strict_ph
2.1.134. --strict_relocations, --no_strict_relocations
2.1.135. --strict_symbols, --no_strict_symbols
2.1.136. --strict_visibility, --no_strict_visibility
2.1.137. --strict_wchar_size, --no_strict_wchar_size
2.1.138. --symbolic
2.1.139. --symbols, --no_symbols
2.1.140. --symdefs=file
2.1.141. --symver_script=file
2.1.142. --symver_soname
2.1.143. --sysv
2.1.144. --tailreorder, --no_tailreorder
2.1.145. --thumb2_library, --no_thumb2_library
2.1.146. --tiebreaker=option
2.1.147. --undefined=symbol
2.1.148. --undefined_and_export=symbol
2.1.149. --unresolved=symbol
2.1.150. --use_definition_visibility
2.1.151. --userlibpath=pathlist
2.1.152. --veneer_inject_type=type
2.1.153. --veneer_pool_size=size
2.1.154. --veneershare, --no_veneershare
2.1.155. --verbose
2.1.156. --version_number
2.1.157. --vfemode=mode
2.1.158. --via=file
2.1.159. --vsn
2.1.160. --workdir=directory
2.1.161. --xref, --no_xref
2.1.162. --xrefdbg, --no_xrefdbg
2.1.163. --xref{from|to}=object(section)
2.2. Steering file commands in alphabetical order
2.2.1. EXPORT
2.2.2. HIDE
2.2.3. IMPORT
2.2.4. RENAME
2.2.5. REQUIRE
2.2.6. RESOLVE
2.2.7. SHOW
3. Formal syntax of the scatter-loading description file
3.1. BNF notation and syntax
3.2. Syntax of a scatter-loading description file
3.3. Load region description
3.3.1. Syntax of a load region description
3.4. Execution region description
3.4.1. Syntax of an execution region description
3.5. Addressing attributes
3.6. Considerations when using a relative address +offset for load regions
3.7. Considerations when using a relative address +offset for execution regions
3.8. Input section description
3.8.1. Syntax of an input section description
3.8.2. Example of module and input select patterns
3.9. Resolving multiple matches
3.10. Behavior when .ANY sections overflow because of linker-generated content
3.10.1. See also
3.11. Resolving path names
3.12. Expression evaluation in scatter files
3.12.1. Expression usage in scatter files
3.12.2. Expression rules in scatter files
3.12.3. Execution address built-in functions for use in scatter files
3.12.4. ScatterAssert function
3.12.5. Symbol related function in a scatter file
3.12.6. Examples of expression evaluation in scatter-loading files
3.13. Scatter files containing relative base address load regions and a ZI execution region
4. BPABI and SysV Shared Libraries and Executables
4.1. About the BPABI
4.2. Platforms supported by the BPABI
4.2.1. Linker support for the BPABI
4.2.2. Linker support for ARM Linux
4.3. Concepts common to all BPABI models
4.3.1. Importing and exporting symbols
4.3.2. Symbol visibility
4.3.3. Automatic import and export
4.3.4. Manual import and export
4.3.5. Symbol versioning
4.3.6. RW compression
4.4. Using SysV models
4.4.1. SysV memory model
4.4.2. Automatic dynamic symbol table rules in SysV models
4.4.3. Addressing modes
4.4.4. Thread local storage
4.4.5. Related linker command-line options
4.5. Using bare metal and DLL-like models
4.5.1. Bare metal and DLL-like memory model
4.5.2. Mandatory symbol versioning in the BPABI DLL-like model
4.5.3. Automatic dynamic symbol table rules in the BPABI DLL-like model
4.5.4. Addressing modes in the BPABI DLL-like model
4.5.5. C++ initialization in the BPABI DLL-like model
4.5.6. Related linker command-line options for the BPABI DLL-like model
5. Features of the Base Platform linking model
5.1. Restrictions on the use of scatter files with the Base Platform model
5.2. Example scatter file for the Base Platform linking model
5.3. Placement of PLT sequences with the Base Platform model

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 ASeptember 2008Release 4.0 for ARM® RealView® Development Suite
Revision A23 January 2009Update 1 for RealView Development Suite v4.0
Revision B10 December 2010Update 2 for RealView Development Suite v4.0
Copyright © 2008-2010 ARM. All rights reserved.ARM DUI 0381B
Non-ConfidentialIDID101213