全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
MPC8349E-mITX的U-Boot连接脚本u-boot.lds分析转1 / MPC8349E-mITX ltib U-Boot board/mpc8349itx/u-boot.lds - by starby 2 /* 3 * Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved. 4 * 5 * See file CREDITS for list of people who contributed to this 6 * project. 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License as10 * published by the Free Software Foundation; either version 2 of11 * the License, or (at your option) any later version.12 *13 * This program is distributed in the hope that it will be useful,14 * but WITHOUT ANY WARRANTY; without even the implied warranty of15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16 * GNU General Public License for more details.17 *18 * You should have received a copy of the GNU General Public License19 * along with this program; if not, write to the Free Software20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,21 * MA 02111-1307 USA22 */23 24 OUTPUT_ARCH(powerpc) /* # 指定输出的可执行文件的平台为powerpc */25 SECTIONS /* 各个段的指定 */26 27 /* Read-only sections, merged into text segment: */28 . = + SIZEOF_HEADERS; /* # 地址加SIZEOF_HEADERS(0x94) .表示当前地址 */29 .interp : *(.interp) /* 定义 .interp段 : 由所有代码的.interp段共同组成. */30 .hash : *(.hash) /* .hash段: 由所有代码的.hash段共同组成. */31 .dynsym : *(.dynsym) 32 .dynstr : *(.dynstr) 33 .rel.text : *(.rel.text) 34 .rela.text : *(.rela.text) 35 .rel.data : *(.rel.data) 36 .rela.data : *(.rela.data) 37 .rel.rodata : *(.rel.rodata) 38 .rela.rodata : *(.rela.rodata) 39 .rel.got : *(.rel.got) 40 .rela.got : *(.rela.got) 41 .rel.ctors : *(.rel.ctors) 42 .rela.ctors : *(.rela.ctors) 43 .rel.dtors : *(.rel.dtors) 44 .rela.dtors : *(.rela.dtors) 45 .rel.bss : *(.rel.bss) 46 .rela.bss : *(.rela.bss) 47 .rel.plt : *(.rel.plt) 48 .rela.plt : *(.rela.plt) 49 .init : *(.init) 50 .plt : *(.plt) 51 .text : /* # 文本段 */52 53 cpu/mpc83xx/start.o (.text) /* # 文本段的第一部分start.S,后跟其他做文本段 */54 *(.text)55 *(.fixup)56 *(.got1)57 . = ALIGN(16); /* # 16字节对齐 */58 *(.rodata)59 *(.rodata1)60 *(.rodata.str1.4)61 62 .fini : *(.fini) =063 .ctors : *(.ctors) 64 .dtors : *(.dtors) 65 66 /* Read-write section, merged into data segment: */67 . = (. + 0x0FFF) & 0xFFFFF000; /* 地址对齐(地址低12位为0) */68 _erotext = .;69 PROVIDE (erotext = .);70 .reloc : /* .reloc段由以下组成 */71 72 *(.got) /* got段 */73 _GOT2_TABLE_ = .; /* _GOT2_TABLE_值为当前地址: .got段结束地址;.got2段起始地址 */74 *(.got2) /* got2段 */75 _FIXUP_TABLE_ = .; /* _FIXUP_TABLE_值: .got2段结束地址;.fixup段起始地址 */76 *(.fixup)77 78 _got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) 2; /* _got2_entries符号定义,其值为GOT表项个数,每个表项占4字节 */79 _fixup_entries = (. - _FIXUP_TABLE_) 2; /* _fixup_entries值为.fixup的字个数 */80 81 .data : /* # 数据段 */82 83 *(.data)84 *(.data1)85 *(.sdata)86 *(.sdata2)87 *(.dynamic)88 CONSTRUCTORS89 90 _edata = .;91 PROVIDE (edata = .);92 93 . = .;94 _u_boot_cmd_start = .; /* 定义u-boot命令起始地址,board_init_r中有调用 */95 .u_boot_cmd : *(.u_boot_cmd) /* u_boot_cmd段 */96 _u_boot_cmd_end = .; /* 同上 _u_boot_cmd_end 符号定义 */97 98 . = .;99 _start_ex_table = .;100 _ex_table : *(_ex_table) 101 _stop_ex_table = .;102 103 . = ALIGN(4096); /* 4096字节对齐 */104 _init_begin = .;105 .text.init : *(.text.init) 106 .data.init : *(.data.init) 107 . = ALIGN(4096);108 _init_end = .; /* start.S中relocate_code计算u-boot镜像text长度,利用了_init_end,后面不再搬运,直接清零clear_bss */109 110 _bss_start = .; /* bss代码段起始地址 */111 .bss :112 113 *(.sbss) *(.scommon)114 *(.dynbss)115 *(.bss)116 *(COMMON)117 118 _end = . ; /* _end 符号定义 bss代码段结束地址,u-boot镜像结束地址 */119 PROVIDE (end = .);120 /* SECTIONS 对各段定义完毕 */121 ENTRY(_start) /* # 指定可执行文件的入口点为符号_start; u-boot在链接时带 -Ttext $(TEXT_BASE) 参数,指定了lds文件中ENTRY(_start)所在的地址为TEXT_BASE*/122 123 124 /* 125 在 board/mpc8349itx/下的config.mk包含 126 #127
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 《GB-T 40421-2021健康信息学 消息与通信 DICOM持久对象的网络访问》专题研究报告
- 2025年中国保险消费者研究报告
- 2024年执业药师(西药)《药理学》考前试题(一)及答案
- 淡水鱼类养殖工安全综合知识考核试卷含答案
- 《GBT 19215.4-2017 电气安装用电缆槽管系统 第 2 部分:特殊要求 第 4 节:辅助端》专题研究报告
- 镁精炼工岗后模拟考核试卷含答案
- 船舶货运员操作竞赛考核试卷含答案
- 电工合金冷变形工岗前内部控制考核试卷含答案
- 印后成型工诚信品质知识考核试卷含答案
- 工业车辆装配调试工安全教育水平考核试卷含答案
- 2025年船舶工业智能化生产模式研究报告及未来发展趋势预测
- 国民经济和社会发展第十五五年规划解读
- 质监站标准工作流程手册
- 公共充电设施施工合同
- 发动机悬置系统设计流程
- 无人机飞行应急处理
- 2025标准合同格式范本:个人住宅外墙装修合同样本
- 项目经理安全管理培训课件
- 私域运营工作汇报
- 2025年社区网格员招录考试真题库完整参考答案
- fsc认证培训课件
评论
0/150
提交评论