Arm® Compiler Reference Guide

Version 6.13


Table of Contents

Preface
About this book
Using this book
Glossary
Typographic conventions
Feedback
Feedback on this product
Feedback on content
Other information
Part A Arm Compiler Tools Overview
A1 Overview of the Arm® Compiler tools
A1.1 Arm® Compiler tool command-line syntax
A1.2 Support level definitions
Part B armclang Reference
B1 armclang Command-line Options
B1.1 Summary of armclang command-line options
B1.2 -C (armclang)
B1.3 -c (armclang)
B1.4 -D
B1.5 -E
B1.6 -e
B1.7 -fbare-metal-pie
B1.8 -fbracket-depth=N
B1.9 -fcommon, -fno-common
B1.10 -fdata-sections, -fno-data-sections
B1.11 -ffast-math, -fno-fast-math
B1.12 -ffixed-rN
B1.13 -ffp-mode
B1.14 -ffunction-sections, -fno-function-sections
B1.15 -fident, -fno-ident
B1.16 @file
B1.17 -fldm-stm, -fno-ldm-stm
B1.18 -fno-builtin
B1.19 -fno-inline-functions
B1.20 -flto, -fno-lto
B1.21 -fexceptions, -fno-exceptions
B1.22 -fomit-frame-pointer, -fno-omit-frame-pointer
B1.23 -fpic, -fno-pic
B1.24 -fropi, -fno-ropi
B1.25 -fropi-lowering, -fno-ropi-lowering
B1.26 -frwpi, -fno-rwpi
B1.27 -frwpi-lowering, -fno-rwpi-lowering
B1.28 -fsanitize
B1.29 -fshort-enums, -fno-short-enums
B1.30 -fshort-wchar, -fno-short-wchar
B1.31 -fstack-protector, -fstack-protector-all, -fstack-protector-strong, -fno-stack-protector
B1.32 -fstrict-aliasing, -fno-strict-aliasing
B1.33 -fsysv, -fno-sysv
B1.34 -ftrapv
B1.35 -fvectorize, -fno-vectorize
B1.36 -fvisibility
B1.37 -fwrapv
B1.38 -g, -gdwarf-2, -gdwarf-3, -gdwarf-4 (armclang)
B1.39 -I
B1.40 -include
B1.41 -L
B1.42 -l
B1.43 -M, -MM
B1.44 -MD, -MMD
B1.45 -MF
B1.46 -MG
B1.47 -MP
B1.48 -MT
B1.49 -march
B1.50 -marm
B1.51 -masm
B1.52 -mbig-endian
B1.53 -mbranch-protection
B1.54 -mcmodel
B1.55 -mcmse
B1.56 -mcpu
B1.57 -mexecute-only
B1.58 -mfloat-abi
B1.59 -mfpu
B1.60 -mimplicit-it
B1.61 -mlittle-endian
B1.62 -mno-neg-immediates
B1.63 -moutline, -mno-outline
B1.64 -mpixolib
B1.65 -munaligned-access, -mno-unaligned-access
B1.66 -mthumb
B1.67 -nostdlib
B1.68 -nostdlibinc
B1.69 -o (armclang)
B1.70 -O (armclang)
B1.71 -pedantic
B1.72 -pedantic-errors
B1.73 -Rpass
B1.74 -S
B1.75 -save-temps
B1.76 -shared (armclang)
B1.77 -std
B1.78 --target
B1.79 -U
B1.80 -u (armclang)
B1.81 -v (armclang)
B1.82 --version (armclang)
B1.83 --version_number (armclang)
B1.84 --vsn (armclang)
B1.85 -W
B1.86 -Wl
B1.87 -Xlinker
B1.88 -x (armclang)
B1.89 -###
B2 Compiler-specific Keywords and Operators
B2.1 Compiler-specific keywords and operators
B2.2 __alignof__
B2.3 __asm
B2.4 __declspec attributes
B2.5 __declspec(noinline)
B2.6 __declspec(noreturn)
B2.7 __declspec(nothrow)
B2.8 __inline
B2.9 __promise
B2.10 __unaligned
B2.11 Global named register variables
B3 Compiler-specific Function, Variable, and Type Attributes
B3.1 Function attributes
B3.2 __attribute__((always_inline)) function attribute
B3.3 __attribute__((cmse_nonsecure_call)) function attribute
B3.4 __attribute__((cmse_nonsecure_entry)) function attribute
B3.5 __attribute__((const)) function attribute
B3.6 __attribute__((constructor(priority))) function attribute
B3.7 __attribute__((format_arg(string-index))) function attribute
B3.8 __attribute__((interrupt("type"))) function attribute
B3.9 __attribute__((malloc)) function attribute
B3.10 __attribute__((naked)) function attribute
B3.11 __attribute__((noinline)) function attribute
B3.12 __attribute__((nonnull)) function attribute
B3.13 __attribute__((noreturn)) function attribute
B3.14 __attribute__((nothrow)) function attribute
B3.15 __attribute__((pcs("calling_convention"))) function attribute
B3.16 __attribute__((pure)) function attribute
B3.17 __attribute__((section("name"))) function attribute
B3.18 __attribute__((unused)) function attribute
B3.19 __attribute__((used)) function attribute
B3.20 __attribute__((value_in_regs)) function attribute
B3.21 __attribute__((visibility("visibility_type"))) function attribute
B3.22 __attribute__((weak)) function attribute
B3.23 __attribute__((weakref("target"))) function attribute
B3.24 Type attributes
B3.25 __attribute__((aligned)) type attribute
B3.26 __attribute__((packed)) type attribute
B3.27 __attribute__((transparent_union)) type attribute
B3.28 Variable attributes
B3.29 __attribute__((alias)) variable attribute
B3.30 __attribute__((aligned)) variable attribute
B3.31 __attribute__((deprecated)) variable attribute
B3.32 __attribute__((packed)) variable attribute
B3.33 __attribute__((section("name"))) variable attribute
B3.34 __attribute__((unused)) variable attribute
B3.35 __attribute__((used)) variable attribute
B3.36 __attribute__((visibility("visibility_type"))) variable attribute
B3.37 __attribute__((weak)) variable attribute
B3.38 __attribute__((weakref("target"))) variable attribute
B4 Compiler-specific Intrinsics
B4.1 __breakpoint intrinsic
B4.2 __current_pc intrinsic
B4.3 __current_sp intrinsic
B4.4 __disable_fiq intrinsic
B4.5 __disable_irq intrinsic
B4.6 __enable_fiq intrinsic
B4.7 __enable_irq intrinsic
B4.8 __force_stores intrinsic
B4.9 __memory_changed intrinsic
B4.10 __schedule_barrier intrinsic
B4.11 __semihost intrinsic
B4.12 __vfp_status intrinsic
B5 Compiler-specific Pragmas
B5.1 #pragma clang system_header
B5.2 #pragma clang diagnostic
B5.3 #pragma clang section
B5.4 #pragma once
B5.5 #pragma pack(...)
B5.6 #pragma unroll[(n)], #pragma unroll_completely
B5.7 #pragma weak symbol, #pragma weak symbol1 = symbol2
B6 Other Compiler-specific Features
B6.1 ACLE support
B6.2 Predefined macros
B6.3 Inline functions
B6.4 Half-precision floating-point data types
B6.5 Half-precision floating-point number format
B6.6 Half-precision floating-point intrinsics
B6.7 Library support for _Float16 data type
B6.8 BFloat16 floating-point number format
B6.9 TT instruction intrinsics
B6.10 Non-secure function pointer intrinsics
B7 armclang Integrated Assembler
B7.1 Syntax of assembly files for integrated assembler
B7.2 Assembly expressions
B7.3 Alignment directives
B7.4 Data definition directives
B7.5 String definition directives
B7.6 Floating-point data definition directives
B7.7 Section directives
B7.8 Conditional assembly directives
B7.9 Macro directives
B7.10 Symbol binding directives
B7.11 Org directive
B7.12 AArch32 Target selection directives
B7.13 AArch64 Target selection directives
B7.14 Space-filling directives
B7.15 Type directive
B7.16 Integrated assembler support for the CSDB instruction
B8 armclang Inline Assembler
B8.1 Inline Assembly
B8.2 File-scope inline assembly
B8.3 Inline assembly statements within a function
B8.3.1 Assembly string
B8.3.2 Output and input operands
B8.3.3 Clobber list
B8.3.4 volatile
B8.4 Inline assembly constraint strings
B8.4.1 Constraint modifiers
B8.4.2 Constraint codes
B8.4.3 Constraint codes common to AArch32 state and AArch64 state
B8.4.4 Constraint codes for AArch32 state
B8.4.5 Constraint codes for AArch64 state
B8.4.6 Using multiple alternative operand constraints
B8.5 Inline assembly template modifiers
B8.5.1 Template modifiers common to AArch32 state and AArch64 state
B8.5.2 Template modifiers for AArch32 state
B8.5.3 Template modifiers for AArch64 state
B8.6 Forcing inline assembly operands into specific registers
B8.7 Symbol references and branches into and out of inline assembly
B8.8 Duplication of labels in inline assembly statements
Part C armlink Reference
C1 armlink Command-line Options
C1.1 --any_contingency
C1.2 --any_placement=algorithm
C1.3 --any_sort_order=order
C1.4 --api, --no_api
C1.5 --autoat, --no_autoat
C1.6 --bare_metal_pie
C1.7 --base_platform
C1.8 --bestdebug, --no_bestdebug
C1.9 --blx_arm_thumb, --no_blx_arm_thumb
C1.10 --blx_thumb_arm, --no_blx_thumb_arm
C1.11 --bpabi
C1.12 --branchnop, --no_branchnop
C1.13 --callgraph, --no_callgraph
C1.14 --callgraph_file=filename
C1.15 --callgraph_output=fmt
C1.16 --callgraph_subset=symbol[,symbol,...]
C1.17 --cgfile=type
C1.18 --cgsymbol=type
C1.19 --cgundefined=type
C1.20 --comment_section, --no_comment_section
C1.21 --cppinit, --no_cppinit
C1.22 --cpu=list (armlink)
C1.23 --cpu=name (armlink)
C1.24 --crosser_veneershare, --no_crosser_veneershare
C1.25 --datacompressor=opt
C1.26 --debug, --no_debug
C1.27 --diag_error=tag[,tag,…] (armlink)
C1.28 --diag_remark=tag[,tag,…] (armlink)
C1.29 --diag_style={arm|ide|gnu} (armlink)
C1.30 --diag_suppress=tag[,tag,…] (armlink)
C1.31 --diag_warning=tag[,tag,…] (armlink)
C1.32 --dll
C1.33 --dynamic_linker=name
C1.34 --eager_load_debug, --no_eager_load_debug
C1.35 --eh_frame_hdr
C1.36 --edit=file_list
C1.37 --emit_debug_overlay_relocs
C1.38 --emit_debug_overlay_section
C1.39 --emit_non_debug_relocs
C1.40 --emit_relocs
C1.41 --entry=location
C1.42 --errors=filename
C1.43 --exceptions, --no_exceptions
C1.44 --export_all, --no_export_all
C1.45 --export_dynamic, --no_export_dynamic
C1.46 --filtercomment, --no_filtercomment
C1.47 --fini=symbol
C1.48 --first=section_id
C1.49 --force_explicit_attr
C1.50 --force_so_throw, --no_force_so_throw
C1.51 --fpic
C1.52 --fpu=list (armlink)
C1.53 --fpu=name (armlink)
C1.54 --got=type
C1.55 --gnu_linker_defined_syms
C1.56 --help (armlink)
C1.57 --import_cmse_lib_in=filename
C1.58 --import_cmse_lib_out=filename
C1.59 --import_unresolved, --no_import_unresolved
C1.60 --info=topic[,topic,…] (armlink)
C1.61 --info_lib_prefix=opt
C1.62 --init=symbol
C1.63 --inline, --no_inline
C1.64 --inline_type=type
C1.65 --inlineveneer, --no_inlineveneer
C1.66 input-file-list (armlink)
C1.67 --keep=section_id (armlink)
C1.68 --keep_intermediate
C1.69 --largeregions, --no_largeregions
C1.70 --last=section_id
C1.71 --legacyalign, --no_legacyalign
C1.72 --libpath=pathlist
C1.73 --library=name
C1.74 --library_security=protection
C1.75 --library_type=lib
C1.76 --list=filename
C1.77 --list_mapping_symbols, --no_list_mapping_symbols
C1.78 --load_addr_map_info, --no_load_addr_map_info
C1.79 --locals, --no_locals
C1.80 --lto, --no_lto
C1.81 --lto_keep_all_symbols, --no_lto_keep_all_symbols
C1.82 --lto_intermediate_filename
C1.83 --lto_level
C1.84 --lto_relocation_model
C1.85 --mangled, --unmangled
C1.86 --map, --no_map
C1.87 --max_er_extension=size
C1.88 --max_veneer_passes=value
C1.89 --max_visibility=type
C1.90 --merge, --no_merge
C1.91 --merge_litpools, --no_merge_litpools
C1.92 --muldefweak, --no_muldefweak
C1.93 -o filename, --output=filename (armlink)
C1.94 --output_float_abi=option
C1.95 --overlay_veneers
C1.96 --override_visibility
C1.97 -Omax (armlink)
C1.98 --pad=num
C1.99 --paged
C1.100 --pagesize=pagesize
C1.101 --partial
C1.102 --pie
C1.103 --piveneer, --no_piveneer
C1.104 --pixolib
C1.105 --pltgot=type
C1.106 --pltgot_opts=mode
C1.107 --predefine="string"
C1.108 --preinit, --no_preinit
C1.109 --privacy (armlink)
C1.110 --ref_cpp_init, --no_ref_cpp_init
C1.111 --ref_pre_init, --no_ref_pre_init
C1.112 --reloc
C1.113 --remarks
C1.114 --remove, --no_remove
C1.115 --ro_base=address
C1.116 --ropi
C1.117 --rosplit
C1.118 --rw_base=address
C1.119 --rwpi
C1.120 --scanlib, --no_scanlib
C1.121 --scatter=filename
C1.122 --section_index_display=type
C1.123 --shared
C1.124 --show_cmdline (armlink)
C1.125 --show_full_path
C1.126 --show_parent_lib
C1.127 --show_sec_idx
C1.128 --soname=name
C1.129 --sort=algorithm
C1.130 --split
C1.131 --startup=symbol, --no_startup
C1.132 --stdlib
C1.133 --strict
C1.134 --strict_flags, --no_strict_flags
C1.135 --strict_ph, --no_strict_ph
C1.136 --strict_preserve8_require8
C1.137 --strict_relocations, --no_strict_relocations
C1.138 --strict_symbols, --no_strict_symbols
C1.139 --strict_visibility, --no_strict_visibility
C1.140 --symbols, --no_symbols
C1.141 --symdefs=filename
C1.142 --symver_script=filename
C1.143 --symver_soname
C1.144 --sysv
C1.145 --tailreorder, --no_tailreorder
C1.146 --tiebreaker=option
C1.147 --unaligned_access, --no_unaligned_access
C1.148 --undefined=symbol
C1.149 --undefined_and_export=symbol
C1.150 --unresolved=symbol
C1.151 --use_definition_visibility
C1.152 --userlibpath=pathlist
C1.153 --veneerinject, --no_veneerinject
C1.154 --veneer_inject_type=type
C1.155 --veneer_pool_size=size
C1.156 --veneershare, --no_veneershare
C1.157 --verbose
C1.158 --version_number (armlink)
C1.159 --via=filename (armlink)
C1.160 --vsn (armlink)
C1.161 --xo_base=address
C1.162 --xref, --no_xref
C1.163 --xrefdbg, --no_xrefdbg
C1.164 --xref{from|to}=object(section)
C1.165 --zi_base=address
C2 Linking Models Supported by armlink
C2.1 Overview of linking models
C2.2 Bare-metal linking model overview
C2.3 Partial linking model overview
C2.4 Base Platform Application Binary Interface (BPABI) linking model overview
C2.5 Base Platform linking model overview
C2.6 SysV linking model overview
C2.7 Concepts common to both BPABI and SysV linking models
C3 Image Structure and Generation
C3.1 The structure of an Arm® ELF image
C3.1.1 Views of the image at each link stage
C3.1.2 Input sections, output sections, regions, and program segments
C3.1.3 Load view and execution view of an image
C3.1.4 Methods of specifying an image memory map with the linker
C3.1.5 Image entry points
C3.1.6 Restrictions on image structure
C3.2 Simple images
C3.2.1 Types of simple image
C3.2.2 Type 1 image structure, one load region and contiguous execution regions
C3.2.3 Type 2 image structure, one load region and non-contiguous execution regions
C3.2.4 Type 3 image structure, multiple load regions and non-contiguous execution regions
C3.3 Section placement with the linker
C3.3.1 Default section placement
C3.3.2 Section placement with the FIRST and LAST attributes
C3.3.3 Section alignment with the linker
C3.4 Linker support for creating demand-paged files
C3.5 Linker reordering of execution regions containing T32 code
C3.6 Linker-generated veneers
C3.6.1 What is a veneer?
C3.6.2 Veneer sharing
C3.6.3 Veneer types
C3.6.4 Generation of position independent to absolute veneers
C3.6.5 Reuse of veneers when scatter-loading
C3.6.6 Generation of secure gateway veneers
C3.7 Command-line options used to control the generation of C++ exception tables
C3.8 Weak references and definitions
C3.9 How the linker performs library searching, selection, and scanning
C3.10 How the linker searches for the Arm® standard libraries
C3.11 Specifying user libraries when linking
C3.12 How the linker resolves references
C3.13 The strict family of linker options
C4 Linker Optimization Features
C4.1 Elimination of common section groups
C4.2 Elimination of unused sections
C4.3 Optimization with RW data compression
C4.3.1 How the linker chooses a compressor
C4.3.2 Options available to override the compression algorithm used by the linker
C4.3.3 How compression is applied
C4.3.4 Considerations when working with RW data compression
C4.4 Function inlining with the linker
C4.5 Factors that influence function inlining
C4.6 About branches that optimize to a NOP
C4.7 Linker reordering of tail calling sections
C4.8 Restrictions on reordering of tail calling sections
C4.9 Linker merging of comment sections
C4.10 Merging identical constants
C5 Accessing and Managing Symbols with armlink
C5.1 About mapping symbols
C5.2 Linker-defined symbols
C5.3 Region-related symbols
C5.3.1 Types of region-related symbols
C5.3.2 Image$$ execution region symbols
C5.3.3 Load$$ execution region symbols
C5.3.4 Load$$LR$$ load region symbols
C5.3.5 Region name values when not scatter-loading
C5.3.6 Linker defined symbols and scatter files
C5.3.7 Methods of importing linker-defined symbols in C and C++
C5.3.8 Methods of importing linker-defined symbols in Arm® assembly language
C5.4 Section-related symbols
C5.4.1 Types of section-related symbols
C5.4.2 Image symbols
C5.4.3 Input section symbols
C5.5 Access symbols in another image
C5.5.1 Creating a symdefs file
C5.5.2 Outputting a subset of the global symbols
C5.5.3 Reading a symdefs file
C5.5.4 Symdefs file format
C5.6 Edit the symbol tables with a steering file
C5.6.1 Specifying steering files on the linker command-line
C5.6.2 Steering file command summary
C5.6.3 Steering file format
C5.6.4 Hide and rename global symbols with a steering file
C5.7 Use of $Super$$ and $Sub$$ to patch symbol definitions
C6 Scatter-loading Features
C6.1 The scatter-loading mechanism
C6.1.1 Overview of scatter-loading
C6.1.2 When to use scatter-loading
C6.1.3 Linker-defined symbols that are not defined when scatter-loading
C6.1.4 Placing the stack and heap with a scatter file
C6.1.5 Scatter-loading command-line options
C6.1.6 Scatter-loading images with a simple memory map
C6.1.7 Scatter-loading images with a complex memory map
C6.2 Root region and the initial entry point
C6.2.1 Effect of the ABSOLUTE attribute on a root region
C6.2.2 Effect of the FIXED attribute on a root region
C6.2.3 Methods of placing functions and data at specific addresses
C6.2.4 Placing functions and data in a named section
C6.2.5 Placing __at sections at a specific address
C6.2.6 Restrictions on placing __at sections
C6.2.7 Automatically placing __at sections
C6.2.8 Manually placing __at sections
C6.2.9 Placing a key in flash memory with an __at section
C6.3 Example of how to explicitly place a named section with scatter-loading
C6.4 Placement of unassigned sections
C6.4.1 Default rules for placing unassigned sections
C6.4.2 Command-line options for controlling the placement of unassigned sections
C6.4.3 Prioritizing the placement of unassigned sections
C6.4.4 Specify the maximum region size permitted for placing unassigned sections
C6.4.5 Examples of using placement algorithms for .ANY sections
C6.4.6 Example of next_fit algorithm showing behavior of full regions, selectors, and priority
C6.4.7 Examples of using sorting algorithms for .ANY sections
C6.4.8 Behavior when .ANY sections overflow because of linker-generated content
C6.5 Placing veneers with a scatter file
C6.6 Placement of CMSE veneer sections for a Secure image
C6.7 Reserving an empty block of memory
C6.7.1 Characteristics of a reserved empty block of memory
C6.7.2 Example of reserving an empty block of memory
C6.8 Placement of Arm® C and C++ library code
C6.8.1 Placing code in a root region
C6.8.2 Placing Arm® C library code
C6.8.3 Placing Arm® C++ library code
C6.9 Aligning regions to page boundaries
C6.10 Aligning execution regions and input sections
C6.11 Preprocessing a scatter file
C6.11.1 Default behavior for armclang -E in a scatter file
C6.11.2 Using other preprocessors in a scatter file
C6.12 Example of using expression evaluation in a scatter file to avoid padding
C6.13 Equivalent scatter-loading descriptions for simple images
C6.13.1 Command-line options for creating simple images
C6.13.2 Type 1 image, one load region and contiguous execution regions
C6.13.3 Type 2 image, one load region and non-contiguous execution regions
C6.13.4 Type 3 image, multiple load regions and non-contiguous execution regions
C6.14 How the linker resolves multiple matches when processing scatter files
C6.15 How the linker resolves path names when processing scatter files
C6.16 Scatter file to ELF mapping
C7 Scatter File Syntax
C7.1 BNF notation used in scatter-loading description syntax
C7.2 Syntax of a scatter file
C7.3 Load region descriptions
C7.3.1 Components of a load region description
C7.3.2 Syntax of a load region description
C7.3.3 Load region attributes
C7.3.4 Inheritance rules for load region address attributes
C7.3.5 Inheritance rules for the RELOC address attribute
C7.3.6 Considerations when using a relative address +offset for a load region
C7.4 Execution region descriptions
C7.4.1 Components of an execution region description
C7.4.2 Syntax of an execution region description
C7.4.3 Execution region attributes
C7.4.4 Inheritance rules for execution region address attributes
C7.4.5 Considerations when using a relative address +offset for execution regions
C7.5 Input section descriptions
C7.5.1 Components of an input section description
C7.5.2 Syntax of an input section description
C7.5.3 Examples of module and input section specifications
C7.6 Expression evaluation in scatter files
C7.6.1 Expression usage in scatter files
C7.6.2 Expression rules in scatter files
C7.6.3 Execution address built-in functions for use in scatter files
C7.6.4 ScatterAssert function and load address related functions
C7.6.5 Symbol related function in a scatter file
C7.6.6 AlignExpr(expr, align) function
C7.6.7 GetPageSize() function
C7.6.8 SizeOfHeaders() function
C7.6.9 Example of aligning a base address in execution space but still tightly packed in load space
C7.6.10 Scatter files containing relative base address load regions and a ZI execution region
C8 BPABI and SysV Shared Libraries and Executables
C8.1 About the Base Platform Application Binary Interface (BPABI)
C8.2 Platforms supported by the BPABI
C8.3 Features common to all BPABI models
C8.3.1 About importing and exporting symbols for BPABI models
C8.3.2 Symbol visibility for BPABI models
C8.3.3 Automatic import and export for BPABI models
C8.3.4 Manual import and export for BPABI models
C8.3.5 Symbol versioning for BPABI models
C8.3.6 RW compression for BPABI models
C8.4 SysV linking model
C8.4.1 SysV standard memory model
C8.4.2 Using the C and C++ libraries
C8.4.3 Using a dynamic Linker
C8.4.4 Automatic dynamic symbol table rules in the SysV linking model
C8.4.5 Symbol definitions defined for SysV compatibility with glibc
C8.4.6 Addressing modes in the SysV linking model
C8.4.7 Thread local storage in the SysV linking model
C8.4.8 Linker command-line options for the SysV linking model
C8.5 Bare metal and DLL-like memory models
C8.5.1 BPABI standard memory model
C8.5.2 Customization of the BPABI standard memory model
C8.5.3 Linker command-line options for bare metal and DLL-like models
C8.5.4 Mandatory symbol versioning in the BPABI DLL-like model
C8.5.5 Automatic dynamic symbol table rules in the BPABI DLL-like model
C8.5.6 Addressing modes in the BPABI DLL-like model
C8.5.7 C++ initialization in the BPABI DLL-like model
C8.6 Symbol versioning
C8.6.1 Overview of symbol versioning
C8.6.2 Embedded symbols
C8.6.3 The symbol versioning script file
C8.6.4 Example of creating versioned symbols
C8.6.5 Linker options for enabling implicit symbol versioning
C9 Features of the Base Platform Linking Model
C9.1 Restrictions on the use of scatter files with the Base Platform model
C9.2 Scatter files for the Base Platform linking model
C9.3 Placement of PLT sequences with the Base Platform model
C10 Linker Steering File Command Reference
C10.1 EXPORT steering file command
C10.2 HIDE steering file command
C10.3 IMPORT steering file command
C10.4 RENAME steering file command
C10.5 REQUIRE steering file command
C10.6 RESOLVE steering file command
C10.7 SHOW steering file command
Part D fromelf Reference
D1 fromelf Command-line Options
D1.1 --base [[object_file::]load_region_ID=]num
D1.2 --bin
D1.3 --bincombined
D1.4 --bincombined_base=address
D1.5 --bincombined_padding=size,num
D1.6 --cad
D1.7 --cadcombined
D1.8 --compare=option[,option,…]
D1.9 --continue_on_error
D1.10 --cpu=list (fromelf)
D1.11 --cpu=name (fromelf)
D1.12 --datasymbols
D1.13 --debugonly
D1.14 --decode_build_attributes
D1.15 --diag_error=tag[,tag,…] (fromelf)
D1.16 --diag_remark=tag[,tag,…] (fromelf)
D1.17 --diag_style={arm|ide|gnu} (fromelf)
D1.18 --diag_suppress=tag[,tag,…] (fromelf)
D1.19 --diag_warning=tag[,tag,…] (fromelf)
D1.20 --disassemble
D1.21 --dump_build_attributes
D1.22 --elf
D1.23 --emit=option[,option,…]
D1.24 --expandarrays
D1.25 --extract_build_attributes
D1.26 --fieldoffsets
D1.27 --fpu=list (fromelf)
D1.28 --fpu=name (fromelf)
D1.29 --globalize=option[,option,…]
D1.30 --help (fromelf)
D1.31 --hide=option[,option,…]
D1.32 --hide_and_localize=option[,option,…]
D1.33 --i32
D1.34 --i32combined
D1.35 --ignore_section=option[,option,…]
D1.36 --ignore_symbol=option[,option,…]
D1.37 --in_place
D1.38 --info=topic[,topic,…] (fromelf)
D1.39 input_file (fromelf)
D1.40 --interleave=option
D1.41 --linkview, --no_linkview
D1.42 --localize=option[,option,…]
D1.43 --m32
D1.44 --m32combined
D1.45 --only=section_name
D1.46 --output=destination
D1.47 --privacy (fromelf)
D1.48 --qualify
D1.49 --relax_section=option[,option,…]
D1.50 --relax_symbol=option[,option,…]
D1.51 --rename=option[,option,…]
D1.52 --select=select_options
D1.53 --show=option[,option,…]
D1.54 --show_and_globalize=option[,option,…]
D1.55 --show_cmdline (fromelf)
D1.56 --source_directory=path
D1.57 --strip=option[,option,…]
D1.58 --symbolversions, --no_symbolversions
D1.59 --text
D1.60 --version_number (fromelf)
D1.61 --vhx
D1.62 --via=file (fromelf)
D1.63 --vsn (fromelf)
D1.64 -w
D1.65 --wide64bit
D1.66 --widthxbanks
Part E armar Reference
E1 armar Command-line Options
E1.1 archive
E1.2 -a pos_name
E1.3 -b pos_name
E1.4 -c (armar)
E1.5 -C (armar)
E1.6 --create
E1.7 -d
E1.8 --debug_symbols
E1.9 --diag_error=tag[,tag,…] (armar)
E1.10 --diag_remark=tag[,tag,…] (armar)
E1.11 --diag_style={arm|ide|gnu} (armar)
E1.12 --diag_suppress=tag[,tag,…] (armar)
E1.13 --diag_warning=tag[,tag,…] (armar)
E1.14 --entries
E1.15 file_list
E1.16 --help (armar)
E1.17 -i pos_name
E1.18 -m pos_name (armar)
E1.19 -n
E1.20 --new_files_only
E1.21 -p
E1.22 -r
E1.23 -s
E1.24 --show_cmdline (armar)
E1.25 --sizes
E1.26 -t
E1.27 -T
E1.28 -u (armar)
E1.29 -v (armar)
E1.30 --version_number (armar)
E1.31 --via=filename (armar)
E1.32 --vsn (armar)
E1.33 -x (armar)
E1.34 --zs
E1.35 --zt
Part F armasm Legacy Assembler Reference
F1 armasm Command-line Options
F1.1 --16
F1.2 --32
F1.3 --apcs=qualifier…qualifier
F1.4 --arm
F1.5 --arm_only
F1.6 --bi
F1.7 --bigend
F1.8 --brief_diagnostics, --no_brief_diagnostics
F1.9 --checkreglist
F1.10 --cpreproc
F1.11 --cpreproc_opts=option[,option,…]
F1.12 --cpu=list (armasm)
F1.13 --cpu=name (armasm)
F1.14 --debug
F1.15 --depend=dependfile
F1.16 --depend_format=string
F1.17 --diag_error=tag[,tag,…] (armasm)
F1.18 --diag_remark=tag[,tag,…] (armasm)
F1.19 --diag_style={arm|ide|gnu} (armasm)
F1.20 --diag_suppress=tag[,tag,…] (armasm)
F1.21 --diag_warning=tag[,tag,…] (armasm)
F1.22 --dllexport_all
F1.23 --dwarf2
F1.24 --dwarf3
F1.25 --errors=errorfile
F1.26 --exceptions, --no_exceptions
F1.27 --exceptions_unwind, --no_exceptions_unwind
F1.28 --execstack, --no_execstack
F1.29 --execute_only
F1.30 --fpmode=model
F1.31 --fpu=list (armasm)
F1.32 --fpu=name (armasm)
F1.33 -g (armasm)
F1.34 --help (armasm)
F1.35 -idir[,dir, …]
F1.36 --keep (armasm)
F1.37 --length=n
F1.38 --li
F1.39 --library_type=lib
F1.40 --list=file
F1.41 --list=
F1.42 --littleend
F1.43 -m (armasm)
F1.44 --maxcache=n
F1.45 --md
F1.46 --no_code_gen
F1.47 --no_esc
F1.48 --no_hide_all
F1.49 --no_regs
F1.50 --no_terse
F1.51 --no_warn
F1.52 -o filename (armasm)
F1.53 --pd
F1.54 --predefine "directive"
F1.55 --reduce_paths, --no_reduce_paths
F1.56 --regnames
F1.57 --report-if-not-wysiwyg
F1.58 --show_cmdline (armasm)
F1.59 --thumb
F1.60 --unaligned_access, --no_unaligned_access
F1.61 --unsafe
F1.62 --untyped_local_labels
F1.63 --version_number (armasm)
F1.64 --via=filename (armasm)
F1.65 --vsn (armasm)
F1.66 --width=n
F1.67 --xref
F2 Structure of armasm Assembly Language Modules
F2.1 Syntax of source lines in armasm syntax assembly language
F2.2 Literals
F2.3 ELF sections and the AREA directive
F2.4 An example armasm syntax assembly language module
F3 Writing A32/T32 Instructions in armasm Syntax Assembly Language
F3.1 About the Unified Assembler Language
F3.2 Syntax differences between UAL and A64 assembly language
F3.3 Register usage in subroutine calls
F3.4 Load immediate values
F3.5 Load immediate values using MOV and MVN
F3.6 Load immediate values using MOV32
F3.7 Load immediate values using LDR Rd, =const
F3.8 Literal pools
F3.9 Load addresses into registers
F3.10 Load addresses to a register using ADR
F3.11 Load addresses to a register using ADRL
F3.12 Load addresses to a register using LDR Rd, =label
F3.13 Other ways to load and store registers
F3.14 Load and store multiple register instructions
F3.15 Load and store multiple register instructions in A32 and T32
F3.16 Stack implementation using LDM and STM
F3.17 Stack operations for nested subroutines
F3.18 Block copy with LDM and STM
F3.19 Memory accesses
F3.20 The Read-Modify-Write operation
F3.21 Optional hash with immediate constants
F3.22 Use of macros
F3.23 Test-and-branch macro example
F3.24 Unsigned integer division macro example
F3.25 Instruction and directive relocations
F3.26 Symbol versions
F3.27 Frame directives
F3.28 Exception tables and Unwind tables
F4 Using armasm
F4.1 armasm command-line syntax
F4.2 Specify command-line options with an environment variable
F4.3 Using stdin to input source code to the assembler
F4.4 Built-in variables and constants
F4.5 Identifying versions of armasm in source code
F4.6 Diagnostic messages
F4.7 Interlocks diagnostics
F4.8 Automatic IT block generation in T32 code
F4.9 T32 branch target alignment
F4.10 T32 code size diagnostics
F4.11 A32 and T32 instruction portability diagnostics
F4.12 T32 instruction width diagnostics
F4.13 Two pass assembler diagnostics
F4.14 Using the C preprocessor
F4.15 Address alignment in A32/T32 code
F4.16 Address alignment in A64 code
F4.17 Instruction width selection in T32 code
F5 Symbols, Literals, Expressions, and Operators in armasm Assembly Language
F5.1 Symbol naming rules
F5.2 Variables
F5.3 Numeric constants
F5.4 Assembly time substitution of variables
F5.5 Register-relative and PC-relative expressions
F5.6 Labels
F5.7 Labels for PC-relative addresses
F5.8 Labels for register-relative addresses
F5.9 Labels for absolute addresses
F5.10 Numeric local labels
F5.11 Syntax of numeric local labels
F5.12 String expressions
F5.13 String literals
F5.14 Numeric expressions
F5.15 Syntax of numeric literals
F5.16 Syntax of floating-point literals
F5.17 Logical expressions
F5.18 Logical literals
F5.19 Unary operators
F5.20 Binary operators
F5.21 Multiplicative operators
F5.22 String manipulation operators
F5.23 Shift operators
F5.24 Addition, subtraction, and logical operators
F5.25 Relational operators
F5.26 Boolean operators
F5.27 Operator precedence
F5.28 Difference between operator precedence in assembly language and C
F6 armasm Directives Reference
F6.1 Alphabetical list of directives armasm assembly language directives
F6.2 About armasm assembly language control directives
F6.3 About frame directives
F6.4 Directives that can be omitted in pass 2 of the assembler
F6.5 ALIAS
F6.6 ALIGN
F6.7 AREA
F6.8 ARM or CODE32 directive
F6.9 ASSERT
F6.10 ATTR
F6.11 CN
F6.12 CODE16 directive
F6.13 COMMON
F6.14 CP
F6.15 DATA
F6.16 DCB
F6.17 DCD and DCDU
F6.18 DCDO
F6.19 DCFD and DCFDU
F6.20 DCFS and DCFSU
F6.21 DCI
F6.22 DCQ and DCQU
F6.23 DCW and DCWU
F6.24 END
F6.25 ENDFUNC or ENDP
F6.26 ENTRY
F6.27 EQU
F6.28 EXPORT or GLOBAL
F6.29 EXPORTAS
F6.30 FIELD
F6.31 FRAME ADDRESS
F6.32 FRAME POP
F6.33 FRAME PUSH
F6.34 FRAME REGISTER
F6.35 FRAME RESTORE
F6.36 FRAME RETURN ADDRESS
F6.37 FRAME SAVE
F6.38 FRAME STATE REMEMBER
F6.39 FRAME STATE RESTORE
F6.40 FRAME UNWIND ON
F6.41 FRAME UNWIND OFF
F6.42 FUNCTION or PROC
F6.43 GBLA, GBLL, and GBLS
F6.44 GET or INCLUDE
F6.45 IF, ELSE, ENDIF, and ELIF
F6.46 IMPORT and EXTERN
F6.47 INCBIN
F6.48 INFO
F6.49 KEEP
F6.50 LCLA, LCLL, and LCLS
F6.51 LTORG
F6.52 MACRO and MEND
F6.53 MAP
F6.54 MEXIT
F6.55 NOFP
F6.56 OPT
F6.57 QN, DN, and SN
F6.58 RELOC
F6.59 REQUIRE
F6.60 REQUIRE8 and PRESERVE8
F6.61 RLIST
F6.62 RN
F6.63 ROUT
F6.64 SETA, SETL, and SETS
F6.65 SPACE or FILL
F6.66 THUMB directive
F6.67 TTL and SUBT
F6.68 WHILE and WEND
F6.69 WN and XN
F7 armasm-Specific A32 and T32 Instruction Set Features
F7.1 armasm support for the CSDB instruction
F7.2 A32 and T32 pseudo-instruction summary
F7.3 ADRL pseudo-instruction
F7.4 CPY pseudo-instruction
F7.5 LDR pseudo-instruction
F7.6 MOV32 pseudo-instruction
F7.7 NEG pseudo-instruction
F7.8 UND pseudo-instruction
Part G Appendixes
A Standard C Implementation Definition
A.1 Implementation definition
A.2 Translation
A.3 Translation limits
A.4 Environment
A.5 Identifiers
A.6 Characters
A.7 Integers
A.8 Floating-point
A.9 Arrays and pointers
A.10 Hints
A.11 Structures, unions, enumerations, and bitfields
A.12 Qualifiers
A.13 Preprocessing directives
A.14 Library functions
A.15 Architecture
B Standard C++ Implementation Definition
B.1 Implementation definition
B.2 General
B.3 Lexical conventions
B.4 Basic concepts
B.5 Standard conversions
B.6 Expressions
B.7 Declarations
B.8 Declarators
B.9 Templates
B.10 Exception handling
B.11 Preprocessing directives
B.12 Library introduction
B.13 Language support library
B.14 General utilities library
B.15 Strings library
B.16 Localization library
B.17 Containers library
B.18 Input/output library
B.19 Regular expressions library
B.20 Atomic operations library
B.21 Thread support library
B.22 Implementation quantities
C Via File Syntax
C.1 Overview of via files
C.2 Via file syntax rules

List of Figures

A1-1 Integration boundaries in Arm Compiler 6.
B5-1 Nonpacked structure S
B5-2 Packed structure SP
B6-1 IEEE half-precision floating-point format
B6-2 BFloat16 floating-point format
C3-1 Relationship between sections, regions, and segments
C3-2 Load and execution memory maps for an image without an XO section
C3-3 Load and execution memory maps for an image with an XO section
C3-4 Simple Type 1 image
C3-5 Simple Type 2 image
C3-6 Simple Type 3 image
C6-1 Simple scatter-loaded memory map
C6-2 Complex memory map
C6-3 Memory map for fixed execution regions
C6-4 .ANY contingency
C6-5 Reserving a region for the stack
C7-1 Components of a scatter file
C7-2 Components of a load region description
C7-3 Components of an execution region description
C7-4 Components of an input section description
C8-1 BPABI tool flow

List of Tables

B1-1 armclang command-line options
B1-2 Floating-point library variants
B1-3 Floating-point library variant selection
B1-4 Translatable options
B1-5 Cryptographic Extensions
B1-6 Floating-point extensions
B1-7 Options for the Matrix Multiplication extension
B1-8 Options for the MVE extension
B1-9 Comparison of disassembly for -moutline with and without -O1 optimization
B1-10 Comparison of disassembly for -moutline with and without -O2 optimization and with func3 enabled
B1-11 Compiling without the -o option
B3-1 Function attributes that the compiler supports, and their equivalents
B4-1 Modifying the FPSCR flags
B6-1 Predefined macros
B6-2 Non-secure function pointer intrinsics
B7-1 Modifiers
B7-2 Unary operators
B7-3 Binary operators
B7-4 Binary logical operators
B7-5 Binary bitwise operators
B7-6 Binary comparison operators
B7-7 Relocation specifiers for AArch32 state
B7-8 Relocation specifiers for AArch64 state
B7-9 Data definition directives
B7-10 Expression types supported by the data definition directives
B7-11 Aliases for the data definition directives
B7-12 Escape characters for the string definition directives
B7-13 Aliases for the floating-point data definition directives
B7-14 Section flags
B7-15 Section Type
B7-16 Sections with implicit flags and default types
B7-17 .if condition modifiers
B7-18 Macro parameter qualifier
B8-1 Constraint modifiers
C1-1 Supported Arm architectures
C1-2 Data compressor algorithms
C1-3 GNU equivalent of input sections
C1-4 Link time optimization dependencies
C3-1 Comparing load and execution views
C3-2 Comparison of scatter file and equivalent command-line options
C4-1 Inlining small functions
C5-1 Image$$ execution region symbols
C5-2 Load$$ execution region symbols
C5-3 Load$$LR$$ load region symbols
C5-4 Image symbols
C5-5 Section-related symbols
C5-6 Steering file command summary
C6-1 Input section properties for placement of .ANY sections
C6-2 Input section properties for placement of sections with next_fit
C6-3 Input section properties and ordering for sections_a.o and sections_b.o
C6-4 Sort order for descending_size algorithm
C6-5 Sort order for cmdline algorithm
C7-1 BNF notation
C7-2 Execution address related functions
C7-3 Load address related functions
C8-1 Symbol visibility
C8-2 Turning on BPABI support
D1-1 Examples of using --base
D1-2 Supported Arm architectures
F1-1 Supported Arm architectures
F1-2 Severity of diagnostic messages
F1-3 Specifying a command-line option and an AREA directive for GNU-stack sections
F3-1 Syntax differences between UAL and A64 assembly language
F3-2 A32 state immediate values (8-bit)
F3-3 A32 state immediate values in MOV instructions
F3-4 32-bit T32 immediate values
F3-5 32-bit T32 immediate values in MOV instructions
F3-6 Stack-oriented suffixes and equivalent addressing mode suffixes
F3-7 Suffixes for load and store multiple instructions
F4-1 Built-in variables
F4-2 Built-in Boolean constants
F4-3 Predefined macros
F4-4 armclang equivalent command-line options
F5-1 Unary operators that return strings
F5-2 Unary operators that return numeric or logical values
F5-3 Multiplicative operators
F5-4 String manipulation operators
F5-5 Shift operators
F5-6 Addition, subtraction, and logical operators
F5-7 Relational operators
F5-8 Boolean operators
F5-9 Operator precedence in Arm assembly language
F5-10 Operator precedence in C
F6-1 List of directives
F6-2 OPT directive settings
F7-1 Summary of pseudo-instructions
F7-2 Range and encoding of expr
A-1 Translation limits

Release Information

Document History
Issue Date Confidentiality Change
0613-00 09 October 2019 Non-Confidential Arm Compiler v6.13 Release.

Non-Confidential Proprietary Notice

This document is protected by copyright and other related rights and the practice or implementation of the information contained in this document may be protected by one or more patents or pending patent applications. No part of this document may be reproduced in any form by any means without the express prior written permission of Arm. No license, express or implied, by estoppel or otherwise to any intellectual property rights is granted by this document unless specifically stated.

Your access to the information in this document is conditional upon your acceptance that you will not use or permit others to use the information for the purposes of determining whether implementations infringe any third party patents.

THIS DOCUMENT IS PROVIDED “AS IS”. ARM PROVIDES NO REPRESENTATIONS AND NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, NON-INFRINGEMENT OR FITNESS FOR A PARTICULAR PURPOSE WITH RESPECT TO THE DOCUMENT. For the avoidance of doubt, Arm makes no representation with respect to, and has undertaken no analysis to identify or understand the scope and content of, third party patents, copyrights, trade secrets, or other rights.

This document may include technical inaccuracies or typographical errors.

TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL ARM BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF ANY USE OF THIS DOCUMENT, EVEN IF ARM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

This document consists solely of commercial items. You shall be responsible for ensuring that any use, duplication or disclosure of this document complies fully with any relevant export laws and regulations to assure that this document or any portion thereof is not exported, directly or indirectly, in violation of such export laws. Use of the word “partner” in reference to Arm’s customers is not intended to create or refer to any partnership relationship with any other company. Arm may make changes to this document at any time and without notice.

If any of the provisions contained in these terms conflict with any of the provisions of any click through or signed written agreement covering this document with Arm, then the click through or signed written agreement prevails over and supersedes the conflicting provisions of these terms. This document may be translated into other languages for convenience, and you agree that if there is any conflict between the English version of this document and any translation, the terms of the English version of the Agreement shall prevail.

The Arm corporate logo and words marked with ® or ™ are registered trademarks or trademarks of Arm Limited (or its subsidiaries) in the US and/or elsewhere. All rights reserved. Other brands and names mentioned in this document may be the trademarks of their respective owners. Please follow Arm’s trademark usage guidelines at http://www.arm.com/company/policies/trademarks.

Copyright © 2019 Arm Limited (or its affiliates). All rights reserved.

Arm Limited. Company 02557590 registered in England.

110 Fulbourn Road, Cambridge, England CB1 9NJ.

LES-PRE-20349

Additional Notices

Some material in this document is based on IEEE 754-1985 IEEE Standard for Binary Floating-Point Arithmetic. The IEEE disclaims any responsibility or liability resulting from the placement and use in the described manner.

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.

Web Address

Non-ConfidentialPDF file icon PDF version101754_0613_00_en
Copyright © 2019 Arm Limited or its affiliates. All rights reserved.