11

I have a statically linked executable compiled from a C program. objdump -x a.out indicates the presence of the .eh_frame section, even after strip -s. Why is this section useful in a C (non-C++) program? What are the risks of stripping it (with strip -R .eh_frame)?

pts
  • 80,836
  • 20
  • 110
  • 183
  • 6
    The other question is indeed similar, but it doesn't address the question I raise: Why is the .eh_frame section useful in C? Please reconsider your vote for duplicate. – pts Jan 26 '14 at 00:25
  • 2
    Agreed, this question is not at all a duplicate of the linked one. I was just about to ask the same thing myself. The linked question is about how the `eh_frame` section works, but for C++ programs. This question is about what it does for C programs, where stack unwinding is not part of the language. – Dolda2000 Apr 15 '14 at 13:51
  • You need to know a platform... – Ben Voigt Oct 26 '14 at 03:58
  • 2
    Related: [Why GCC compiled C program needs .eh_frame section?](https://stackoverflow.com/questions/26300819/why-gcc-compiled-c-program-needs-eh-frame-section) –  Oct 26 '14 at 04:13
  • 1
    Does this answer your question: http://stackoverflow.com/questions/26300819/why-gcc-compiled-c-program-needs-eh-frame-section#answer-26302715 – jmajnert Nov 10 '14 at 10:18

1 Answers1

2

From remyabel's comment and OP's confirmation, the answer to the OP question is available via another SO question as linked by:

Why GCC compiled C program needs .eh_frame section?

Community
  • 1
  • 1
Toby
  • 9,696
  • 16
  • 68
  • 132