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

555549: adding .gnu_debuglink section in kernel modules



retitle 555549 adding .gnu_debuglink section in kernel modules
thanks


Ben,

I looked into dh_strip and it does seem to be doing the right thing.


sub attach_debug {
        my $file=shift;
        my $debug_path=shift;
        doit("objcopy", "--add-gnu-debuglink", $debug_path, $file);
}


attach_debug is called when the -k option is passed.

        foreach (@shared_libs) {
                my $debug_path = make_debug($_, $tmp, $debugtmp) if 
$keep_debug;
                # Note that all calls to strip on shared libs
                # *must* inclde the --strip-unneeded.
                doit("strip","--remove-section=.comment",
                        "--remove-section=.note","--strip-unneeded",$_);
                attach_debug($_, $debug_path) if defined $debug_path;
        }

        foreach (@executables) {
                my $debug_path = make_debug($_, $tmp, $debugtmp) if 
$keep_debug;
                doit("strip","--remove-section=.comment",
                        "--remove-section=.note",$_);
                attach_debug($_, $debug_path) if defined $debug_path;
        }



When -k is specified, $keep_debug is set.

        # Support for keeping the debugging symbols in a detached file.
        my $keep_debug=$dh{K_FLAG};

And based on $keep_debug, $debug_path is populated
                my $debug_path = make_debug($_, $tmp, $debugtmp) if 
$keep_debug;



I tried re-building the kernel image with dh_strip -k  but that did not help. 
So, how is the linux-image-xxxx-dbg package created ?


Ritesh


On Saturday 26 Jun 2010 19:00:26 Kurt Roeckx wrote:
> reassign 555549 src:linux-2.6 2.6.32-15
> thanks
> 
> I atleast see the same problem with 2.6.32-15.
> 
> Please try adding it with:
> objcopy
> --add-gnu-debuglink=/usr/lib/debug/lib/modules/2.6.34-1-amd64/kernel/fs/bt
> rfs/btrfs.ko /lib/modules/2.6.34-1-amd64/kernel/fs/btrfs/btrfs.ko
> 
> It will only store the "btrfs.ko" part in the file, but objcopy
> will look that this file exists.  Using
> "--add-gnu-debuglink=/lib/modules/2.6.34-1-amd64/kernel/fs/btrfs/btrfs.ko"
> should produce the same thing.
> 
> This is normally something dh_strip should be doing, or whatever
> is used to place the debug symbols in the separate file.
> 
> As I believe all problems in elfutils are solved, I'm reassigning
> this bug.
> 
> 
> Kurt

-- 
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System

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


Reply to: