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: PATCH: Fix linkonce support with debug


On Fri, Jun 13, 2003 at 10:24:50AM -0700, H. J. Lu wrote:
> On Fri, Jun 13, 2003 at 02:26:32PM +0930, Alan Modra wrote:
> > On Thu, Jun 12, 2003 at 01:01:27PM -0700, H. J. Lu wrote:
> > > Alan,
> > > 
> > > I believe your change mentioned in
> > > 
> > > http://sources.redhat.com/ml/binutils/2001-09/msg00499.html
> > > 
> > > breaks linkonce support with debug:
> > > 
> > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7671
> > 
> > I doubt that changing section ordering has anything to do with this
> > problem.  The real problem is that we have debug info for a removed
> > section, with relocations that are left dangling.  The debug info
> > ought to be removed along with the section, preferably by using
> > section groups.
> > 
> 
> This patch seems to work for me. We should try to preserve debug
> information discarded by linkonce as much as we can. It may not be
> ideal. But it is better than the current one.

No, I believe it is worse.

Consider that you now have multiple sections in .debug_info covering
the same PC range - not necessarily all identical.

Also consider what happens if the multiple copies of the linkonce
function are compiled with (say) different optimization levels.  You
will have added a lot of line information which is completely bogus.


-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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