title: How to reverse the objcopy's strip with only-keep-debug?
body: <p>In modern linux almost all objects are stripped and splitted in two parts (two files). First is executable itself and second is debug symbols, stripped out from original ELF. Such files are created with </p>
  
  <pre><code>objcopy --only-keep-debug original.elf binary.dbg
  mv original.elf binary
  objcopy --strip-debug binary
  </code></pre>
  
  <p>How can I merge <code>binary</code> and <code>binary.dbg</code> into ELF file with debugging info? I want to recreate unstripped, original binary. It can be not byte-to-byte equal to the original, but it must to have a debug symbols inside.</p>
  
  <p>PS Yes, I know about <code>gnu.debuglink</code> section, but it doesn't work for some debuggers (etnus) and disassemblers (objdump can't restore symbols info)</p>