Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the use of the .eh_frame section in C programs?

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)?

like image 970
pts Avatar asked Jan 25 '14 13:01

pts


People also ask

What is EH frame?

About eh_frame, it contains exception unwinding and source language information. Each entry in this section is represented by single CFI (call frame information )

What is exception frame?

A frame-based exception handler allows you to deal with the possibility that an exception may occur in a certain sequence of code.


1 Answers

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?

like image 90
3 revs Avatar answered Sep 22 '22 00:09

3 revs