todayrw 发表于 2009-02-02 09:52

arm-elf-strip的参数o不能用怎么办?

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: *** Error 1

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

cjaizss 发表于 2009-02-02 10:23

你把一个o文件strip了干嘛呢....

prolj 发表于 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

samon_fu 发表于 2009-02-06 00:38

我也没用过。

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

harry_he 发表于 2009-08-05 15:54

用法没问题,是不是工具链有问题?

用objcopy试试
arm-elf-objcopy -R .debug_info obj/armv4-le-elf/hal.o obj/armv4-le-elf/t.o
页: [1]
查看完整版本: arm-elf-strip的参数o不能用怎么办?