title: How to remove a specific ELF section, without stripping other symbols?
body: <p>I have an ELF 32-bit x86 file which contains an <code>.eh_frame</code> section, despite my attempts<sup>1</sup> to remove it.</p>
  
  <p>I'd like to remove the <code>.eh_frame</code> section, without touching any symbols in other sections, including unused ones.</p>
  
  <p><code>strip</code> does not seem to have an option <code>--remove-only</code>, and it always ends up modifying other sections.</p>
  
  <p>How can I remove a single ELF section without modifying anything else in the file?</p>
  
  <p><sup>1</sup>As suggested in <a href="https://stackoverflow.com/questions/26300819/why-gcc-compiled-c-program-needs-eh-frame-section">other questions</a>, I tried several variants of <code>gcc-3.4.3 -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables -fno-unwind-tables</code>, but the <code>.eh_frame</code> section is always there. This is probably due to the fact that I have to use an old GCC (3.4.3)... the source file itself contains nothing special that might require these sections: <code>int main() { return 0; }</code>.</p>