little kernel 是一款用于安卓及大部分嵌入式系统的bootloader
英伟达nx的cboot就是基于此系统
1、分析.ld文件
. = ALIGN(8); #分配8字节对齐的内存空间给__commands_start
__commands_start = .;
KEEP ((.commands)) #将所有包含.commands的段进行存储
__commands_end = .;#记录.commands结束位置,后面的和此操作一致,这样就能获取所有包含.commands的变量段在程序中调用section函数将所有的程序加入此段就能进行批量初始化
. = ALIGN(8);
__apps_start = .;
KEEP ((.apps))
__apps_end = .;
. = ALIGN(8);
__devices = .;
KEEP((.devices))
__devices_end = .;
__fs_impl_start = .;
KEEP ((.fs_impl))
__fs_impl_end = .;
LK系统(cboot) .ld文件分析
最新推荐文章于 2024-03-01 14:01:12 发布