MPC8349E-mITX的U-Boot连接脚本u-boot.lds分析.doc_第1页
MPC8349E-mITX的U-Boot连接脚本u-boot.lds分析.doc_第2页
MPC8349E-mITX的U-Boot连接脚本u-boot.lds分析.doc_第3页
MPC8349E-mITX的U-Boot连接脚本u-boot.lds分析.doc_第4页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论