连接器脚本

来源:互联网 发布:h3c acl禁止445端口 编辑:程序博客网 时间:2024/04/30 05:56
2.1 链接器脚本-
一个可执行程序通常是由:代码段,数据段,bss段构成的。同样,在用于链接这个程序的链接器脚本中,就会反应出这几个段的信息。

连接器脚本的编写(led.lds):
SECTIONS {
. = 0x30008000;        >>.是当前位置 0x30008000是地址.说明程序从30008000开始运行


. = ALIGN(4);            >>代码段用4字节对齐
.text :
{
start.o(.text)                >>代码段先运行start.o。代码段首文件
*(.text)
}

. = ALIGN(4);              >>数据段4字节对齐
.data :
{
*(.data)
}


. = ALIGN(4);              >>bss段4字节对齐
bss_start = . ;              >>定义变量bss_start在当前的地址位置。
.bss :
{
*(.bss)
}
bss_end = . ;               >>定义变量bss_end在当前的地址位置。(在程序中可以使用这个代码,比如计算bss段的长度)
}

<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(36) | 评论(0) | 转发(0) |
0

上一篇:十九、安装Linux系统到开发板

下一篇:交叉编译gdb遇到no termcap library found的解决方法

相关热门文章
  • 多磁盘自动分区自动挂载脚本...
  • python subprocess Popen
  • 监控Oracle数据库的常用shell...
  • shell脚本学习记录
  • SecureCRT中Script脚本使用心...
  • SHTML是什么_SSI有什么用...
  • 卡尔曼滤波的原理说明...
  • 查看linux中某个端口(port)...
  • 关于java中的“错误:找不到或...
  • shell中字符串操作
  • linux dhcp peizhi roc
  • 关于Unix文件的软链接
  • 求教这个命令什么意思,我是新...
  • sed -e "/grep/d" 是什么意思...
  • 谁能够帮我解决LINUX 2.6 10...
给主人留下些什么吧!~~
原创粉丝点击