问题描述
对此我非常陌生,我有elf文件 input.out
,需要从中创建十六进制可执行文件。我正在使用objcopy以intel十六进制格式创建可执行文件,如下所示:
I am very very new to this, I have elf file input.out
and need to create hex executable from it. I am using objcopy to create executable in intel hex format as follows
objcopy -O ihex input.out out.hex
hex包含所有部分(.interp,.note.ABI-tag等)的数据,但是我不确定可执行文件是否全部必需。只是.text部分足以创建可执行的十六进制,所以我可以按以下方式使用还是需要其他任何部分?
by this out.hex contains data from all sections (.interp, .note.ABI-tag etc), but i am not sure if all of it is required for executable. Is just .text section enough for creating executable hex so can i just use as below or any more sections are required
objcopy -j.text -O ihex input.out out.hex
如果有什么好的参考可以理解细节,我在Goggling找不到很多。可能我不知道要搜索什么。
Also if there any good reference to understand this in detail, I couldn't find much by Goggling. Probably I don't know what to search.
推荐答案
它可以与
objcopy -O ihex input.elf output.hex
这篇关于如何从elf文件格式创建可执行十六进制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!