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]
Other format: [Raw text]

Re: .eh_frame section on alpha


On Tue, Jan 04, 2005 at 11:40:21PM +0100, Jakub Jelinek wrote:
> On Wed, Jan 05, 2005 at 08:27:20AM +1100, Simon Burge wrote:
> > On Tue, Jan 04, 2005 at 09:51:11AM -0800, Richard Henderson wrote:
> > 
> > > On Tue, Jan 04, 2005 at 10:14:03AM +0000, Nick Clifton wrote:
> > > > Presumably yes.  But I assume that the feeling is that invoking an 
> > > > assembler switch is simpler for the user than requiring them to write or 
> > > > edit linker scripts.
> > > 
> > > If you're writing boot loaders, you're already writing linker scripts.
> > 
> > We currently don't use a linker script.  Here's the complete linker
> > line:
> > 
> > alpha--netbsd-ld -Ttext 0x20000000 -N -e start -o bootxx_ffs.sym \
> >   start.o bootxx.o booted_dev.o blkdev.o prom.o prom_disp.o putstr.o \
> >   panic_putstr.o lib/sa/libsa.a kern/libkern.a -Map bootxx_ffs.map
> > 
> > Since we don't already use (and therefore have to maintain) a separate
> > linker script, a command line option to not generate these new .eh_frame
> > sections seems like the cleanest solution to me.
> 
> Hmm, doing
> alpha--netbsd-ld -Ttext 0x20000000 -N --verbose 2>&1 \
>   | sed -n '/^==========/,/^===========/{/^========/d;s,^[[:blank:]]*\.eh_frame[[:blank:]]*:,/DISCARD/ ,;p}' \
>   > bootxx_ffs.lds
> ... -T bootxxxx_ffs.lds
> doesn't seem to be much harder, does it?

This works, although I needed to change the "/DISCARD/ " to "/DISCARD/ : "
otherwise ld gave a "parse error".  I'll talk with the other NetBSD folks
that work in this area, but this looks good to me.

Back to part of my original question - why did the .eh_frame section
become mandatory on alpha when it doesn't appear to be on any other
architecture?  I'm not a C++ person, but I understood that this section
was used with the exception handling mechanism.

Thanks!
Simon.
--
Simon Burge                                   <simonb@wasabisystems.com>
NetBSD Development, Support and Service:   http://www.wasabisystems.com/


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