[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#555549: 555549: adding .gnu_debuglink section in kernel modules



On Sat, 2010-08-14 at 09:58 +0200, Bastian Blank wrote:
> On Sat, Aug 14, 2010 at 04:17:27AM +0100, Ben Hutchings wrote:
> > [I also wonder why we are copying the unstripped modules into
> > /usr/lib/debug and not just debug info?
> 
> Because the tools can't cope with them.

OK.

> >                                          And shouldn't this really be
> > part of Kbuild?  Here's how we could do it in Kbuild:
> 
> >  quiet_cmd_modules_install = INSTALL $@
> > +ifdef INSTALL_MOD_DEBUGLINK
> > +      cmd_modules_install = mkdir -p $(2); mkdir -p $(3); $(OBJCOPY) --only-keep-debug $@ $(3)/$(@F) && $(OBJCOPY) --strip-debug --add-gnu-debuglink=$(3)/$(@F) $@ $(2)/$(@F)
> 
> The link looks wrong, it includes the absolute path during install time.
> 
> +      cmd_modules_install = mkdir -p $(2); mkdir -p $(3); $(OBJCOPY) --only-keep-debug $@ $(3)/$(@F) && $(OBJCOPY) --strip-debug --add-gnu-debuglink=$(4)/$(@F) $@ $(2)/$(@F)
[...]

objcopy stores only the base name of the debug info file, but it also
stores a CRC.  It needs the current absolute path in order to calculate
the CRC.

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: