How to create a executable hex from elf file format

人走茶凉 提交于 2020-01-04 03:14:09

问题


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

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

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.


回答1:


It could work with

objcopy -O ihex input.elf output.hex


来源:https://stackoverflow.com/questions/19458031/how-to-create-a-executable-hex-from-elf-file-format

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!