TQ210 —— s5pv210u-boot.lds分析

/*
 * (C) Copyright 2002
 * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
 *
 * See file CREDITS for list of people who contributed to this
 * project.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 * MA 02111-1307 USA
 */
// u-boot.lds决定了u-boot可执行映像的连接方式,以及各个段的装载地址(装载域)和执行地址(运行域)。
// 这个文件指定了各个文件链接后的先后排序。
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/
OUTPUT_ARCH(arm)
ENTRY(_start)
SECTIONS
{
   /* 
   指定可执行image文件的全局入口点,通常这个地址都放在ROM(flash)0x0位置。
   必须使编译器知道这个地址,通常都是修改此处来完成
   */
	. = 0x00000000; /* .表示当前,当前地址是0,但这不是_start地址,会被TETX_BASE替代 */
    /* 
	    代码段基地址,board\samsung\TQ210\config.mk中定义,TEXT_BASE=0x23e00000 
		无论这里是什么都会被TEXT_BASE替代,所以这里的这个地址是不起作用的
	*/
	. = ALIGN(4); /* 4字节对齐 */
	.text      :  @ 指定代码段
	{   @ 执行顺序,start.S先运行
		cpu/s5pv210/start.o			(.text)   
		cpu/s5pv210/s5pv210/cpu_init.o		(.text)
		board/samsung/TQ210/lowlevel_init.o	(.text)
/*		cpu/s5pc11x/onenand_cp.o		(.text)		*/
		cpu/s5pv210/nand_cp.o			(.text)
		cpu/s5pv210/movi.o			(.text)
		/*common/secure_boot.o			(.text)*/
		common/ace_sha1.o			(.text)
		cpu/s5pv210/pmic.o			(.text)
		*					(.text)  @ 其它代码部分
	}

	. = ALIGN(4);
	.rodata : { *(.rodata) }  @ 指定只读数据段

	. = ALIGN(4);
	.data : { *(.data) }   @ 指定读写数据段

	. = ALIGN(4);
	.got : { *(.got) }   @ 指定got段,got段式是uboot自定义的一个段,非标准段

	__u_boot_cmd_start = .;   @ u_boot命令段起始
	.u_boot_cmd : { *(.u_boot_cmd) }
	__u_boot_cmd_end = .;     @ u_boot命令段结束

	. = ALIGN(4);
	.mmudata : { *(.mmudata) } @ mmu数据

	. = ALIGN(4);
	__bss_start = .; @ bss段起始
	.bss : { *(.bss) }
	_end = .;        @ bss段结束
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值