PATCH: Fix linkonce support with debug

H. J. Lu hjl@lucon.org
Fri Jun 13 18:27:00 GMT 2003


On Fri, Jun 13, 2003 at 01:58:02PM -0400, Daniel Jacobowitz wrote:
> > > > 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.
> > 
> > That is why I said it was not ideal.
> > >
> > > 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.
> > > 
> > 
> > Isn't is completely bogus in this situation today? We are picking
> 
> Here at least the bad line number information gets thrown down at PC 0. 
> It's still bogus, but on most systems less likely to get in the way.
> 
> > one from 2 bad choices. I don't think mine is any worse than the
> > current one.
> 
> I think it's worse.  It definitely isn't any better.
> 

There is a testcase which my patch fixes. Do you have a testcase which
works without my patch and doesn't work with my patch?


H.J.



More information about the Binutils mailing list