最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

embedded - With objcopy, is there a reason to use -S with -O binary? - Stack Overflow

programmeradmin4浏览0评论

While researching embedded arm programming using gnu tools, I have found many examples, such as here or here, of build scripts where objcopy is invoked with -S -O binary, for example:

 arm-none-eabi-objcopy -S -O binary file.elf file.bin

According to the objcopy man page, the -S option (--strip-all) means "Do not copy relocation and symbol information from the source file. Also deletes debug sections."

However, it is my understanding that, when using -O binary, "All symbols and relocation information will be discarded."

So is including -S with -O binary redundant?

Would the following command give the same result?

arm-none-eabi-objcopy -g -O binary file.elf file.bin

Thanks.

发布评论

评论列表(0)

  1. 暂无评论