source: grub-pc/trunk/fuentes/grub-core/gmodule.pl.in @ 22

Last change on this file since 22 was 22, checked in by mabarracus, 4 years ago

updated version and apply net.ifnames=0 into debian/rules

File size: 611 bytes
Line 
1###
2### Generate GDB commands, that load symbols for specified module,
3### with proper section relocations. See .gdbinit
4###
5### $Id: gmodule.pl,v 1.2 2006/05/14 11:38:42 lkundrak Exp lkundrak $
6### Lubomir Kundrak <lkudrak@skosi.org>
7###
8
9use strict;
10
11while (<>) {
12        my ($name, %sections) = split;
13
14        print "add-symbol-file $name.module";
15
16        open (READELF, "readelf -S $name.mod |") or die;
17        while (<READELF>) {
18                /\[\s*(\d+)\]\s+(\.\S+)/ or next;
19
20                if ($2 eq '.text') {
21                        print " $sections{$1}";
22                        next;
23                }
24
25                print " -s $2 $sections{$1}"
26                        if ($sections{$1} ne '0x0');
27        };
28        close (READELF);
29        print "\n";
30}
Note: See TracBrowser for help on using the repository browser.