title: How to create a executable hex from elf file format
body: <p>I am very very new to this, I have elf file <code>input.out</code> and need to create hex executable from it. I am using objcopy to create executable in intel hex format as follows</p>
  
  <pre><code>objcopy -O ihex input.out out.hex
  </code></pre>
  
  <p>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</p>
  
  <pre><code>objcopy -j.text -O ihex input.out out.hex
  </code></pre>
  
  <p>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.</p>