免费注册 查看新帖 |

Chinaunix

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

arm-elf-strip的参数o不能用怎么办? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-02-02 09:52 |只看该作者 |倒序浏览
5可用积分
arm-elf-strip --strip-unneeded -o obj/armv4-le-elf/t.o obj/armv4-le-elf/hal.o
arm-elf-strip: invalid option -- o
Usage: arm-elf-strip <switches> in-file(s)
The switches are:
  -I --input-target <bfdname>      Assume input file is in format <bfdname>
  -O --output-target <bfdname>     Create an output file in format <bfdname>
  -F --target <bfdname>            Set both input and output format to <bfdname>
  -p --preserve-dates              Copy modified/access timestamps to the output
  -R --remove-section <name>       Remove section <name> from the output
  -s --strip-all                   Remove all symbol and relocation information
  -g -S --strip-debug              Remove all debugging symbols
     --strip-unneeded              Remove all symbols not needed by relocations
  -N --strip-symbol <name>         Do not copy symbol <name>
  -K --keep-symbol <name>          Only copy symbol <name>
  -x --discard-all                 Remove all non-global symbols
  -X --discard-locals              Remove any compiler-generated symbols
  -v --verbose                     List all object files modified
  -V --version                     Display this program's version number
  -h --help                        Display this output
  -o <file>                        Place stripped output into <file>
arm-elf-strip: supported targets: elf32-littlearm elf32-bigarm elf32-little elf32-big srec symbolsrec tekhex binary ihex
make[3]: *** [obj/armv4-le-elf/hal.mangle] Error 1

我将makefile中的"-o"删除掉,又报错说“没有文件obj/armv4-le-elf/t.o”,到底该怎样解决这个问题啊?

论坛徽章:
3
2015年迎新春徽章
日期:2015-03-04 09:56:11数据库技术版块每日发帖之星
日期:2016-08-03 06:20:00数据库技术版块每日发帖之星
日期:2016-08-04 06:20:00
2 [报告]
发表于 2009-02-02 10:23 |只看该作者
你把一个o文件strip了干嘛呢....

论坛徽章:
0
3 [报告]
发表于 2009-02-02 19:13 |只看该作者
先声明我没用过这个东西,下面内容是我的猜测,lz可以试试看。
如果命令的参数没问题,试试看把makefile的那一行改成下面的样子。
arm-elf-strip --strip-unneeded -o obj/armv4-le-elf/t.o
arm-elf-strip --strip-unneeded -o obj/armv4-le-elf/hal.o

论坛徽章:
0
4 [报告]
发表于 2009-02-06 00:38 |只看该作者
我也没用过。

以前都是strip一个可执行文件。

论坛徽章:
0
5 [报告]
发表于 2009-08-05 15:54 |只看该作者
用法没问题,是不是工具链有问题?

用objcopy试试
arm-elf-objcopy -R .debug_info obj/armv4-le-elf/hal.o obj/armv4-le-elf/t.o
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP