This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: gc sections and .eh_frame
> > I think it doesn't work (alone) either, because you unconditionally mark
> > all .gcc_except_table* sections, which themselves point to the functions.
>
> That doesn't make any difference, because .gcc_except_table* is marked
> via KEEP() in the linker script. So I don't think you need anything
> more than the patch I posted.
That's not quite true, .gcc_except_table is indeed marked as KEEP, but
not .gcc_except_table.* :-)
That's the crux of the mechanism: an unpatched (non broken) compiler will only
emit .gcc_except_table. But a patched compiler (i.e. the AdaCore compiler or
the FSF compiler + http://gcc.gnu.org/ml/gcc-patches/2004-03/msg01433.html)
will emit .gcc_except_table.* with -ffunction-sections, making it possible to
have a working --gc-sections for languages with EH.
--
Eric Botcazou