免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1894 | 回复: 1
打印 上一主题 下一主题

[BootLoader] u-boot v2 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-04-17 18:56 |只看该作者 |倒序浏览
我在做u-boot-v2(barebox)移植的时候,想通过axd做源码调试。
这样做的前提是要在Linux环境下(我用的ubuntu)生成uboot.bin和uboot文件。
其中uboot文件要包含调试信息。
我查看elf文件信息的结果如下:
root@vm:/samba/uboot2-rc10# readelf -S ./uboot
There are 12 section headers, starting at offset 0x3049c:
Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .text             PROGBITS        a7f00000 008000 01e3a8 00  AX  0   0 32
  [ 2] .rodata           PROGBITS        a7f1e3a8 0263a8 006038 00   A  0   0  4
  [ 3] .data             PROGBITS        a7f243e0 02c3e0 0020a8 00  WA  0   0  4
  [ 4] .u_boot_cmd       PROGBITS        a7f26488 02e488 000720 00   A  0   0  4
  [ 5] .u_boot_initcalls PROGBITS        a7f26ba8 02eba8 000068 00  WA  0   0  4
  [ 6] .bss              NOBITS          a7f26c10 02ec10 00790c 00  WA  0   0  4
  [ 7] .comment          PROGBITS        00000000 02ec10 001810 00      0   0  1
  [ 8] .ARM.attributes   ARM_ATTRIBUTES  00000000 030420 000010 00      0   0  1
  [ 9] .shstrtab         STRTAB          00000000 030430 00006b 00      0   0  1
  [10] .symtab           SYMTAB          00000000 03067c 009e40 10     11 2100  4
  [11] .strtab           STRTAB          00000000 03a4bc 003d4a 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)

而在u-boot-v2(barebox)中没有config.mk文件,我该怎么在编译时增加elf文件中的调试信息?

谢谢!!

论坛徽章:
1
巳蛇
日期:2013-10-28 15:55:33
2 [报告]
发表于 2012-04-17 22:27 |只看该作者
gcc -g
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP