2
### Generate GDB commands, that load symbols for specified module,
3
### with proper section relocations. See .gdbinit
5
### $Id: gmodule.pl,v 1.2 2006/05/14 11:38:42 lkundrak Exp lkundrak $
6
### Lubomir Kundrak <lkudrak@skosi.org>
12
my ($name, %sections) = split;
14
print "add-symbol-file $name.module";
16
open (READELF, "readelf -S $name.mod |") or die;
18
/\[\s*(\d+)\]\s+(\.\S+)/ or next;
21
print " $sections{$1}";
25
print " -s $2 $sections{$1}"
26
if ($sections{$1} ne '0x0');