Let’s first look at the format of the connection script
SECTIONS {
.text 0 : { *(.text) }
//将所有(*符号代表任意输入文件)输入文件的.text section合并成一个.text section, 该section的地址由定位器符号的值指定
.rodata : { *(.rodata) }
//将所有输入文件的.data section合并成一个.data section, 该section的地址被置为0×8000000.
.data 0x30000000 : AT(0x800) { *(.data) }
// 将所有输入文件的.data section合并成一个.data section, 该section的地址被置为0×8000000
.bss : { *(.bss) *(.COMMON) }
//将所有输入文件的.bss section合并成一个.bss section,该section的地址被置为0×8000000+.data section的大小.
连接器每读完一个section描述后, 将定位器符号的值*增加*该section的大小. 注意: 此处没有考虑对齐约束.
}