This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: [RFA/DWARF2] Handle nested subprograms in CU pc bound calculation


On Tue, Sep 30, 2008 at 09:55:57AM -0700, Joel Brobecker wrote:
> > >   1. When compiling with -ffunction-sections, the compiler is not
> > >      providing the CU PC bounds (DW_AT_low_pc and DW_AT_high_pc).
> > >      I would imagine that this is because functions might be removed
> > >      later during the link, and thus bounds might be affected.
> > 
> > It should provide DW_AT_ranges instead.  Is it not doing that?  What
> > era compiler is this?
> 
> The compiler is based on GCC 4.1. I don't really know what GCC 4.3 does.
> How would the range help with -ffunction-section, though? Does the
> linker known how to remove one of the ranges when he discards an
> unused function?

It'd be reduced to an empty range, or at least moved to zero.  As long
as that isn't the list terminator it'd work OK.  If it is, some linker
smarts may be needed...

-- 
Daniel Jacobowitz
CodeSourcery


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