ARMLINK 的几个概念

ELF格式中,

.text 对应RO段

.constdata 对应RO段

.data  对应RW 段

.bss 对应ZI段

 

;一个arm由RO,RW,ZI三个段组成 (对于GNU工具 对应的概念是TEXT ,DATA,BSS)

;bootloader要将RW段复制到ro中并将ZI段清零 编译器使用下列段来记录各段的起始和结束地址

; |Image$$RO$$Base| ; RO段起始地址

; |Image$$RO$$Limit| ; RO段结束地址加1

; |Image$$RW$$Base| ; RW段起始地址

; |Image$$RW$$Limit| ; RW段结束地址加1

; |Image$$ZI$$Base| ; ZI段起始地址

; |Image$$ZI$$Limit| ; ZI段结束地址加1

 

The selectors are not case-sensitive. The following selectors are
recognized:
• RO-CODE
• RO-DATA
• RO, selects both RO-CODE and RO-DATA
• RW-DATA
• RW-CODE
• RW, selects both RW-CODE and RW-DATA
• ZI
• ENTRY, that is a section containing an ENTRY point.
The following synonyms are recognized:
• CODE for RO-CODE
• CONST for RO-DATA
• TEXT for RO
• DATA for RW
• BSS for ZI.
The following pseudo-attributes are recognized:
• FIRST
• LAST.

 

 

FIRST and LAST can be used to mark the first and last sections in an
execution region if the placement order is important (for example, if a
specific input section must be first in the region and an input section
containing a checksum must be last). The first occurrence of FIRST or LAST
as an input_section_attr terminates the list.

你可能感兴趣的:(ARMLINK 的几个概念)