This is the mail archive of the binutils@sources.redhat.com 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]

Re: linkonce sections, DWARF2 EH, and the ppc failures


> Date: Wed, 20 Jun 2001 13:46:11 +0930
> From: Alan Modra <amodra@bigpond.net.au>

> On Tue, Jun 19, 2001 at 08:00:11PM -0700, Geoff Keating wrote:

> > Can anyone think of a better solution?
> 
> Emit the eh_frame header and info for non-linkonce functions to
> sections .eh_frame1, .eh_frame2, etc., bumping section number whenever
> you hit a linkonce function.  linkonce eh info goes to
> .gnu.linkonce.eh.*, without it's own header.  Then link with
> 
>   .eh_frame :
>   {
>     *(.eh_frame* .gnu.linkonce.eh.*)
>   }
> 
> The idea being to actually remove the eh info along with the corresponding
> linkonce text, and have the linker put everything else back together.

This is pretty clever!  It gives one header per output file, though,
not one header per .o file.  I can't think of a way of doing one
header per .o file without some way of distinguishing .o
files... which I think the C++ compiler can do, for such things as AIX
constructors.  Except that then we'd have to have the distinguisher in
the name of the linkonce section, which would prevent them from
actually being linkonce.

Sigh.

> Oh, and fix the linker so that the above doesn't reorder anything
> (linkonce sections currently get moved around, which I believe is a bug),
> or plug in inconvenient padding for section alignment.

Yes.  It'd be nice to keep the linkonce sections in the order they
came in, if only because that would make the actual search through the
EH data more efficient.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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