This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: gc sections and .eh_frame


On Wed, Aug 24, 2005 at 05:04:48PM -0700, Jim Blandy wrote:
> That is, normally, if the GC keeps some section A, and A has relocs
> referring to (symbols defined in) some section B, then the GC should
> also keep B.  Conversely, if there are no kept sections with relocs
> referring to B, then B should be dropped.

Yes, and yes.

> For exception handling tables, however, the relocs point in the
> opposite direction: if the GC keeps some code section A, and some
> exception table B has relocs referring to A, then the GC should also
> keep B.  Conversely, if there are no kept code sections that an
> exception table B has relocs referring to, then B should be dropped.

No.  gc marking of sections referenced from .gcc_except_table* should be
as for any other section.  If we had per-function .eh_frame sections
then there wouldn't be anything special at all about .eh_frame* and
.gcc_except_table*.  ie. relocs in .eh_frame* would reference
.gcc_except_table*.  The trouble is that we have a monolithic .eh_frame,
so we can't treat its relocs normally (and we can't break up .eh_frame
easily, but that's another story).

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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