没有合适的资源?快使用搜索试试~ 我知道了~
首页Arm编译器嵌入式参考指南版本6.18
Arm编译器嵌入式参考指南版本6.18
需积分: 5 19 下载量 139 浏览量
更新于2024-07-05
1
收藏 7.49MB PDF 举报
Arm Compiler for Embedded Reference Guide 6.18
Arm Compiler for Embedded Reference Guide 6.18 是一份关于 Arm 编译器的参考指南,旨在为开发者提供详细的编译器使用指南和技术文档。该指南涵盖了 Arm 编译器的各个方面,包括编译器的架构、指令集、优化技术、调试技术等。
**编译器架构**
Arm 编译器的架构基于 RISC(Reduced Instruction Set Computing)架构,旨在提高编译器的性能和效率。该架构包括指令 Fetch、指令解码、执行单元、寄存器文件、load/store 单元等部分。
**指令集**
Arm 编译器支持多种指令集,包括 Armv7-A、Armv7-R、Armv7-M、Armv8-A、Armv8-R、Armv8-M 等。这些指令集提供了不同的指令格式、寄存器数量和寻址模式,满足不同应用场景的需求。
**优化技术**
Arm 编译器提供了多种优化技术,旨在提高编译后的代码性能和效率。这些技术包括:
* Dead code elimination:删除无效代码,减少代码大小和执行时间。
* Constant folding and propagation:将常量折叠和传播,以减少计算次数和提高性能。
* Copy elimination:删除重复的赋值操作,减少代码大小和执行时间。
* Dead store elimination:删除无效的存储操作,减少代码大小和执行时间。
**调试技术**
Arm 编译器提供了多种调试技术,旨在帮助开发者 debug 和优化代码。这些技术包括:
* Source-level debugging:在源代码级别进行调试,查看变量的值和执行路径。
* Assembly-level debugging:在汇编代码级别进行调试,查看寄存器的值和指令的执行情况。
* Performance profiling:分析代码的执行时间和资源占用,帮助开发者优化代码。
**版本历史**
Arm Compiler for Embedded Reference Guide 6.18 的版本历史记录了编译器的发展历程,包括每个版本的新特性、改进和 bug 修复。
**结论**
Arm Compiler for Embedded Reference Guide 6.18 是一份功能强大且详细的参考指南,旨在帮助开发者更好地理解和使用 Arm 编译器。该指南涵盖了编译器的架构、指令集、优化技术、调试技术等方面,提供了丰富的信息和技术支持。
Arm
®
Compiler for Embedded Reference Guide
Document ID: 101754_6.18_00_en
Version 6.18
Contents
4.1.132 --show_parent_lib.............................................................................................................................. 392
4.1.133 --show_sec_idx................................................................................................................................... 392
4.1.134 --soname=name................................................................................................................................. 393
4.1.135 --sort=algorithm................................................................................................................................. 393
4.1.136 --split.....................................................................................................................................................395
4.1.137 --startup=symbol, --no_startup...................................................................................................... 396
4.1.138 --stdlib.................................................................................................................................................. 397
4.1.139 --strict................................................................................................................................................... 397
4.1.140 --strict_flags, --no_strict_flags.........................................................................................................398
4.1.141 --strict_ph, --no_strict_ph................................................................................................................ 398
4.1.142 --strict_preserve8_require8............................................................................................................. 399
4.1.143 --strict_relocations, --no_strict_relocations..................................................................................399
4.1.144 --strict_symbols, --no_strict_symbols............................................................................................400
4.1.145 --strict_visibility, --no_strict_visibility.............................................................................................401
4.1.146 --summary_stderr, --no_summary_stderr..................................................................................... 401
4.1.147 --symbols, --no_symbols.................................................................................................................. 402
4.1.148 --symdefs=filename...........................................................................................................................402
4.1.149 --symver_script=filename.................................................................................................................403
4.1.150 --symver_soname...............................................................................................................................403
4.1.151 --sysv.................................................................................................................................................... 404
4.1.152 --tailreorder, --no_tailreorder.......................................................................................................... 405
4.1.153 --tiebreaker=option............................................................................................................................405
4.1.154 --unaligned_access, --no_unaligned_access.................................................................................406
4.1.155 --undefined=symbol.......................................................................................................................... 407
4.1.156 --undefined_and_export=symbol....................................................................................................407
4.1.157 --unresolved=symbol.........................................................................................................................408
4.1.158 --use_definition_visibility..................................................................................................................408
4.1.159 --userlibpath=pathlist........................................................................................................................409
4.1.160 --veneerinject, --no_veneerinject...................................................................................................409
4.1.161 --veneer_inject_type=type...............................................................................................................410
4.1.162 --veneer_pool_size=size................................................................................................................... 411
4.1.163 --veneershare, --no_veneershare................................................................................................... 411
4.1.164 --verbose..............................................................................................................................................412
4.1.165 --version_number (armlink)..............................................................................................................412
4.1.166 --via=filename (armlink)....................................................................................................................412
4.1.167 --vsn (armlink).....................................................................................................................................413
Copyright © 2019–2022 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 16 of 920
Arm
®
Compiler for Embedded Reference Guide
Document ID: 101754_6.18_00_en
Version 6.18
Contents
4.1.168 --xo_base=address.............................................................................................................................413
4.1.169 --xref, --no_xref..................................................................................................................................414
4.1.170 --xrefdbg, --no_xrefdbg.................................................................................................................... 414
4.1.171 --xreffrom, --xrefto............................................................................................................................ 415
4.1.172 --zi_base=address.............................................................................................................................. 415
4.2 Linking Models Supported by armlink.................................................................................................. 416
4.2.1 Overview of linking models................................................................................................................. 416
4.2.2 Bare-metal linking model overview....................................................................................................418
4.2.3 Partial linking model overview.............................................................................................................419
4.2.4 Base Platform Application Binary Interface (BPABI) linking model overview............................420
4.2.5 Base Platform linking model overview.............................................................................................. 421
4.2.6 SysV linking model overview............................................................................................................... 422
4.2.7 Concepts common to both BPABI and SysV linking models........................................................ 423
4.3 Image Structure and Generation............................................................................................................423
4.3.1 The structure of an Arm ELF image.................................................................................................. 423
4.3.2 Simple images..........................................................................................................................................435
4.3.3 Section placement with the linker......................................................................................................443
4.3.4 Linker support for creating demand-paged files............................................................................. 448
4.3.5 Linker reordering of execution regions containing T32 code.......................................................450
4.3.6 Linker-generated veneers..................................................................................................................... 450
4.3.7 Command-line options used to control the generation of C++ exception tables.................... 455
4.3.8 Weak references and definitions........................................................................................................ 455
4.3.9 How the linker performs library searching, selection, and scanning...........................................458
4.3.10 How the linker searches for the Arm standard libraries............................................................. 459
4.3.11 Specifying user libraries when linking............................................................................................. 460
4.3.12 How the linker resolves references................................................................................................. 461
4.3.13 The strict family of linker options....................................................................................................462
4.4 Linker Optimization Features.................................................................................................................. 462
4.4.1 Elimination of common section groups.............................................................................................462
4.4.2 Elimination of unused sections........................................................................................................... 463
4.4.3 Optimization with RW data compression.........................................................................................464
4.4.4 Function inlining with the linker......................................................................................................... 467
4.4.5 Factors that influence function inlining.............................................................................................468
4.4.6 About branches that optimize to a NOP..........................................................................................469
4.4.7 Linker reordering of tail calling sections........................................................................................... 470
4.4.8 Restrictions on reordering of tail calling sections........................................................................... 470
Copyright © 2019–2022 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 17 of 920
Arm
®
Compiler for Embedded Reference Guide
Document ID: 101754_6.18_00_en
Version 6.18
Contents
4.4.9 Linker merging of comment sections.................................................................................................471
4.4.10 Merging identical constants...............................................................................................................471
4.5 Accessing and Managing Symbols with armlink................................................................................. 473
4.5.1 About mapping symbols....................................................................................................................... 473
4.5.2 Linker-defined symbols..........................................................................................................................475
4.5.3 Region-related symbols......................................................................................................................... 475
4.5.4 Section-related symbols........................................................................................................................ 481
4.5.5 Access symbols in another image...................................................................................................... 483
4.5.6 Edit the symbol tables with a steering file.......................................................................................487
4.5.7 Use of $Super$$ and $Sub$$ to patch symbol definitions......................................................... 490
4.6 Scatter-loading Features...........................................................................................................................491
4.6.1 The scatter-loading mechanism.......................................................................................................... 491
4.6.2 Root region and the initial entry point..............................................................................................498
4.6.3 Example of how to explicitly place a named section with scatter-loading................................ 516
4.6.4 Manual placement of unassigned sections.......................................................................................517
4.6.5 Placing veneers with a scatter file..................................................................................................... 531
4.6.6 Placement of CMSE veneer sections for a Secure image.............................................................531
4.6.7 Reserving an empty block of memory.............................................................................................. 533
4.6.8 Placement of Arm C and C++ library code......................................................................................535
4.6.9 Alignment of regions to page boundaries........................................................................................ 538
4.6.10 Alignment of execution regions and input sections.....................................................................539
4.6.11 Preprocessing a scatter file................................................................................................................540
4.6.12 Example of using expression evaluation in a scatter file to avoid padding............................. 542
4.6.13 Equivalent scatter-loading descriptions for simple images.........................................................543
4.6.14 How the linker resolves multiple matches when processing scatter files............................... 551
4.6.15 How the linker resolves path names when processing scatter files.........................................553
4.6.16 Scatter file to ELF mapping...............................................................................................................553
4.7 Scatter File Syntax.....................................................................................................................................555
4.7.1 BNF notation used in scatter-loading description syntax............................................................. 555
4.7.2 Syntax of a scatter file.......................................................................................................................... 556
4.7.3 Load region descriptions.......................................................................................................................557
4.7.4 Execution region descriptions..............................................................................................................564
4.7.5 Input section descriptions.................................................................................................................... 573
4.7.6 Expression evaluation in scatter files.................................................................................................579
4.8 BPABI and SysV Shared Libraries and Executables............................................................................589
4.8.1 About the Base Platform Application Binary Interface (BPABI)...................................................589
Copyright © 2019–2022 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 18 of 920
Arm
®
Compiler for Embedded Reference Guide
Document ID: 101754_6.18_00_en
Version 6.18
Contents
4.8.2 Platforms supported by the BPABI.................................................................................................... 590
4.8.3 Features common to all BPABI models.............................................................................................590
4.8.4 SysV linking model................................................................................................................................. 594
4.8.5 Bare metal and DLL-like memory models.........................................................................................602
4.8.6 Symbol versioning...................................................................................................................................610
4.9 Features of the Base Platform Linking Model.....................................................................................613
4.9.1 Restrictions on the use of scatter files with the Base Platform model...................................... 614
4.9.2 Scatter files for the Base Platform linking model........................................................................... 616
4.9.3 Placement of PLT sequences with the Base Platform model.......................................................617
4.10 Linker Steering File Command Reference..........................................................................................618
4.10.1 EXPORT steering file command....................................................................................................... 618
4.10.2 HIDE steering file command.............................................................................................................619
4.10.3 IMPORT steering file command....................................................................................................... 620
4.10.4 RENAME steering file command......................................................................................................621
4.10.5 REQUIRE steering file command......................................................................................................622
4.10.6 RESOLVE steering file command..................................................................................................... 623
4.10.7 SHOW steering file command..........................................................................................................624
5 fromelf Reference....................................................................................................................................... 626
5.1 fromelf Command-line Options..............................................................................................................626
5.1.1 --base [[object_file::]load_region_ID=]num....................................................................................... 626
5.1.2 --bin............................................................................................................................................................627
5.1.3 --bincombined......................................................................................................................................... 628
5.1.4 --bincombined_base=address...............................................................................................................629
5.1.5 --bincombined_padding=size,num.......................................................................................................630
5.1.6 --cad...........................................................................................................................................................631
5.1.7 --cadcombined.........................................................................................................................................632
5.1.8 --compare=option[,option,…]................................................................................................................633
5.1.9 --continue_on_error................................................................................................................................634
5.1.10 --coprocN=value (fromelf)..................................................................................................................634
5.1.11 --cpu=list (fromelf)............................................................................................................................... 636
5.1.12 --cpu=name (fromelf).......................................................................................................................... 637
5.1.13 --datasymbols........................................................................................................................................640
5.1.14 --debugonly........................................................................................................................................... 640
5.1.15 --decode_build_attributes...................................................................................................................641
5.1.16 --diag_error=tag[,tag,…] (fromelf)......................................................................................................642
Copyright © 2019–2022 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 19 of 920
Arm
®
Compiler for Embedded Reference Guide
Document ID: 101754_6.18_00_en
Version 6.18
Contents
5.1.17 --diag_remark=tag[,tag,…] (fromelf).................................................................................................. 642
5.1.18 --diag_style={arm|ide|gnu} (fromelf)................................................................................................. 643
5.1.19 --diag_suppress=tag[,tag,…] (fromelf)...............................................................................................644
5.1.20 --diag_warning=tag[,tag,…] (fromelf)................................................................................................ 644
5.1.21 --disassemble.........................................................................................................................................645
5.1.22 --dump_build_attributes......................................................................................................................646
5.1.23 --elf.......................................................................................................................................................... 646
5.1.24 --emit=option[,option,…].....................................................................................................................647
5.1.25 --expandarrays...................................................................................................................................... 649
5.1.26 --extract_build_attributes....................................................................................................................650
5.1.27 --fieldoffsets.......................................................................................................................................... 651
5.1.28 --fpu=list (fromelf)................................................................................................................................653
5.1.29 --fpu=name (fromelf)........................................................................................................................... 653
5.1.30 --globalize=option[,option,…]............................................................................................................. 654
5.1.31 --help (fromelf)......................................................................................................................................655
5.1.32 --hide=option[,option,…]..................................................................................................................... 655
5.1.33 --hide_and_localize=option[,option,…].............................................................................................656
5.1.34 --i32.........................................................................................................................................................656
5.1.35 --i32combined.......................................................................................................................................657
5.1.36 --ignore_section=option[,option,…].................................................................................................. 658
5.1.37 --ignore_symbol=option[,option,…]...................................................................................................659
5.1.38 --in_place................................................................................................................................................659
5.1.39 --info=topic[,topic,…] (fromelf).......................................................................................................... 660
5.1.40 input_file (fromelf)................................................................................................................................661
5.1.41 --interleave=option.............................................................................................................................. 662
5.1.42 --linkview, --no_linkview.....................................................................................................................663
5.1.43 --localize=option[,option,…]................................................................................................................664
5.1.44 --m32...................................................................................................................................................... 665
5.1.45 --m32combined.................................................................................................................................... 666
5.1.46 --only=section_name........................................................................................................................... 666
5.1.47 --output=destination........................................................................................................................... 667
5.1.48 --privacy (fromelf).................................................................................................................................668
5.1.49 --qualify.................................................................................................................................................. 669
5.1.50 --relax_section=option[,option,…]..................................................................................................... 669
5.1.51 --relax_symbol=option[,option,…]..................................................................................................... 670
5.1.52 --rename=option[,option,…]............................................................................................................... 671
Copyright © 2019–2022 Arm Limited (or its affiliates). All rights reserved.
Non-Confidential
Page 20 of 920
剩余919页未读,继续阅读
101 浏览量
点击了解资源详情
417 浏览量
2024-01-02 上传
101 浏览量
263 浏览量
521 浏览量
231 浏览量
474 浏览量
Mr.老铁
- 粉丝: 7
- 资源: 101
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- c语言程序设计 入门教程
- Linux系统 疑难解答 之99式
- 线性回归原理 讲义 实例
- 合格的电子工程师需要掌握的知识和技能
- 菜鸟学用DreamWeaver做ASP(一)
- 计算机类期刊投稿心得..作者亲身体会..最好的资料
- 高质量C++编程指南
- 微型计算机原理及其应用实验指导书
- Thinking.In.Java.3rd.Edition.Chinese.eBook.pdf
- ann77 python
- .net c# 中文版教程.pdf
- 程序设计方法学PPT
- 西电汤子赢教材的答案(超全版)
- C语言嵌入式系统必讀
- Design Patterns Explained
- TL16C552带FIFO的双异步通信组件
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功