This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: .eh_frame section


"sfora dim" <sfora.dim@gmail.com> writes:

> I read that the eh_frame is for exceptions support,
> for languages like C++ for instance.

Yes.

> I wonder why when I compile standard C programs using "gcc -v simple.c"
> I can see that the linker adds the "--eh-frame-hdr" parameter ?

That option is always used if the linker supports it.

> After all there is no use for the eh section when we don't support
> exceptions, no ?

Ideally the linker would not generate an EH header if there is no
exception frame information.

It is possible to use gcc to link C++ code, and it is desirable to
always create an EH header if there is any exception frame
information, so if there is a problem here I think it should be fixed
in the linker.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]