uboot的链接脚本
2016-04-21 14:50
267 查看
《朱老师物联网大讲堂》学习笔记
学习地址:www.zhulaoshi.org
uboot\board\samsung\x210\u-boot.lds
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/
OUTPUT_ARCH(arm)
ENTRY(_start)
SECTIONS
{
. = 0x00000000;
. = ALIGN(4);
.text :
{
cpu/s5pc11x/start.o (.text)
cpu/s5pc11x/s5pc110/cpu_init.o (.text)
board/samsung/x210/lowlevel_init.o (.text)
cpu/s5pc11x/onenand_cp.o (.text)
cpu/s5pc11x/nand_cp.o (.text)
cpu/s5pc11x/movi.o (.text)
common/secure_boot.o (.text)
common/ace_sha1.o (.text)
cpu/s5pc11x/pmic.o (.text)
*(.text)
}
. = ALIGN(4);
.rodata : { *(.rodata) }
. = ALIGN(4);
.data : { *(.data) }
. = ALIGN(4);
.got : { *(.got) }
__u_boot_cmd_start = .;
.u_boot_cmd : { *(.u_boot_cmd) }
__u_boot_cmd_end = .;
. = ALIGN(4);
.mmudata : { *(.mmudata) }
. = ALIGN(4);
__bss_start = .;
.bss : { *(.bss) }
_end = .;
}
这个链接地址,获取方式有两种,
一种是裸机中-Ttext 0x0,
一种是链接脚本中.=0x00000000,
而具体到我们这个链接地址的由来,
往上追得话就是这里,主makefile中TEXT_BASE,
x210_sd_config : unconfig
@$(MKCONFIG) $(@:_config=) arm s5pc11x x210 samsung s5pc110
@echo "TEXT_BASE = 0xc3e00000" > $(obj)board/samsung/x210/config.mk
忘了说链接脚本的内容了,
一个是4字节对齐,.=ALIGN(4)
另一个要说的是,
段内顺序安排,有uboot前16KB有关系,
对于自定义段,也很重要,后面会专门讲,
学习地址:www.zhulaoshi.org
uboot\board\samsung\x210\u-boot.lds
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/
OUTPUT_ARCH(arm)
ENTRY(_start)
SECTIONS
{
. = 0x00000000;
. = ALIGN(4);
.text :
{
cpu/s5pc11x/start.o (.text)
cpu/s5pc11x/s5pc110/cpu_init.o (.text)
board/samsung/x210/lowlevel_init.o (.text)
cpu/s5pc11x/onenand_cp.o (.text)
cpu/s5pc11x/nand_cp.o (.text)
cpu/s5pc11x/movi.o (.text)
common/secure_boot.o (.text)
common/ace_sha1.o (.text)
cpu/s5pc11x/pmic.o (.text)
*(.text)
}
. = ALIGN(4);
.rodata : { *(.rodata) }
. = ALIGN(4);
.data : { *(.data) }
. = ALIGN(4);
.got : { *(.got) }
__u_boot_cmd_start = .;
.u_boot_cmd : { *(.u_boot_cmd) }
__u_boot_cmd_end = .;
. = ALIGN(4);
.mmudata : { *(.mmudata) }
. = ALIGN(4);
__bss_start = .;
.bss : { *(.bss) }
_end = .;
}
这个链接地址,获取方式有两种,
一种是裸机中-Ttext 0x0,
一种是链接脚本中.=0x00000000,
而具体到我们这个链接地址的由来,
往上追得话就是这里,主makefile中TEXT_BASE,
x210_sd_config : unconfig
@$(MKCONFIG) $(@:_config=) arm s5pc11x x210 samsung s5pc110
@echo "TEXT_BASE = 0xc3e00000" > $(obj)board/samsung/x210/config.mk
忘了说链接脚本的内容了,
一个是4字节对齐,.=ALIGN(4)
另一个要说的是,
段内顺序安排,有uboot前16KB有关系,
对于自定义段,也很重要,后面会专门讲,
相关文章推荐
- 【学习】如何制作手机端html模板(REM的实际应用)
- saltstack(五) saltstack的state状态管理
- 环境相关的测试
- [Oracle]ASP.NET+Oracle连接类conn.cs
- Unity热门插件推荐
- 视频编解码学习之一:理论基础
- Android之View覆盖问题
- TCP/UDP网络编程入门教程之二:TCP Server端——socket与文件描述符
- __weak与__block修饰符到底有什么区别
- handle Message 的用法
- NSDate_解决本地时间差8小时
- maven-mybatis分页插件配置
- cocos2dx多线程以及线程同步 与 cocos2dx内存管理与多线程问题
- C#基础知识之使用字典
- js如何打印object对象
- Swiper说明及API手册说明
- AlertDialog使用时遇到问题
- valn 配置
- 使用String的HashCode作为Map主键需要注意的地方
- Educational Codeforces Round 12 B C题、