On 29 May 2007 15:27:43 -0700, Ian Lance Taylor <[EMAIL PROTECTED]> wrote:
> 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.
I don't know if it is a problem. If it's a pure C program, and we're giving
the linker the "--eh-frame-hdr" - does it still generate the EH header ?
if so - does it waste memory ?
if yes, maybe the gcc driver should pass that parameter to the linker only
when there really is exception frame information ?
thank you
sfora
Ian