- 3
- 0
- 约2.15万字
- 约 51页
- 2019-07-20 发布于四川
- 举报
* * * * * * * * * * * * *** ANIMATED *** Purpose: In more detail, go over the rules which the linker observes when placing code and data. This provides useful background when we talk about scatterloading. The linker observes some basic rules to decide where code and data. The first level of the hierarchy is attribute. RO precedes RW precedes ZI. Within each attribute code precedes data. From there, the linker places input sections alphabetically by name. So, in this example, section A is placed before section B. Finally, within input sections, code and data from individual objects is placed in the order the object files are specified on the linker command line. So, in our example, any code in section A from file1.o is placed before any code from file2.o. In practice, the user is not advised to rely on these rules if precise placement of code and data is needed. Full control of placement of code and data is available through scatterloading (to be discussed later). =========== For the most part, the default section name for compiler output (and much of the library code) is “.text”. __main.o, gets a section labelled “!!!” (to ensure that it is placed first in a given region). At this point we haven’t mentioned execution regions, since we are discussing the “out-of-the-box” experience. All these rules are observed within each execution region. This point needs to be emphasized in the scatterloading section of this module. In reality, there is a distinction made between “output sections” and “input sections”. Output sections are really what is depicted on the left of the diagram. These are ordered by attribute (RO-code, RO-data etc…). This terminology was deliberately left out of the presentation because, although fundamental to the operation of the linker, it would introduce unnecessary confusion for the average user. If needed, a full discussion is in Section 3.1 of the ADS 1.2 Linker and Utilities Guide. Similar info in RVCT 2 docs too. * Purp
您可能关注的文档
最近下载
- (35页PPT)《时代广场的蟋蟀》.pptx VIP
- 内江市2022-2023学年七年级上学期期末历史试题【带答案】.docx VIP
- 2025年八年级上册道法试卷及答案人教版.doc VIP
- 电工个人述职报告5篇.docx VIP
- (2020年-第7期)预防医学知识(每周一练).docx VIP
- 福建省南平市2022-2023学年七年级上学期期末历史试题.pdf VIP
- 湖南省高二上学期期末数学试题 (解析版).pdf VIP
- 2016年河北新武安钢铁集团文安钢铁有限公司200m2烧结机建设项目初步设计安全专篇.doc
- 气凝胶绝热厚型涂料系统.pdf VIP
- 2026年交管12123学法减分复习考试题库完整版.docx VIP
原创力文档

文档评论(0)