[LLVMdev] So what's the deal with debug_frame V eh_frame

Joerg Sonnenberger joerg at britannica.bec.de
Wed Mar 19 18:10:09 PDT 2014


On Wed, Mar 19, 2014 at 05:31:05PM -0700, David Blaikie wrote:
> While comparing debug info between GCC and Clang I found a section
> that only Clang produces and GCC never produces: debug_frame.

The advantage of using .debug_frame is that it can be easily stripped.
As the name implies, it is supposed to not change the semantic of code.
.eh_frame is used if the ABI for the current platform and language
settings requires unwinding support. If that is not the case, e.g. for
Linux/i386 compiling C (no special options) or C++ (-fno-exceptions),
the unwind support is optional and can be stripped. For NetBSD, we now
enable unwind support per default even for C, so it would always create
.eh_frame.

Joerg



More information about the llvm-dev mailing list