正点原子:链接脚本imx6ul.lds解读

SECTIONS{
. = 0X87800000; //链接到0x87800000,从这里开始
.text : //指定代码段
{
start.o //第一个代码部分
main.o //第二个代码部分
*(.text)
}

.rodata ALIGN(4) : { * (.rodata*)} //指定只读数据段 4字节对齐
.data ALIGN(4) : { * (.data) } //指定读/写数据段 4字节对齐
__bss_start = .; //把__bss_start定义为当前位置(起始)
.bss ALIGN(4) : { *(.bss) *(COMMON) }
__bss_end = .; //把__bss_end定义为当前位置(终地址)
}

. 代表当前
.text 代表代码段
.rodata 只读数据段
.data读/写数据段
ALIGN(4) 四字节对齐
.bss 未初始化的数据段

猜你喜欢

转载自blog.csdn.net/mbs520/article/details/104984385