Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../lib/grub/i386-pc
File: gmodule.pl
###
[0] Fix | Delete
### Generate GDB commands, that load symbols for specified module,
[1] Fix | Delete
### with proper section relocations. See .gdbinit
[2] Fix | Delete
###
[3] Fix | Delete
### $Id: gmodule.pl,v 1.2 2006/05/14 11:38:42 lkundrak Exp lkundrak $
[4] Fix | Delete
### Lubomir Kundrak <lkudrak@skosi.org>
[5] Fix | Delete
###
[6] Fix | Delete
[7] Fix | Delete
use strict;
[8] Fix | Delete
[9] Fix | Delete
while (<>) {
[10] Fix | Delete
my ($name, %sections) = split;
[11] Fix | Delete
[12] Fix | Delete
print "add-symbol-file $name.module";
[13] Fix | Delete
[14] Fix | Delete
open (READELF, "readelf -S $name.mod |") or die;
[15] Fix | Delete
while (<READELF>) {
[16] Fix | Delete
/\[\s*(\d+)\]\s+(\.\S+)/ or next;
[17] Fix | Delete
[18] Fix | Delete
if ($2 eq '.text') {
[19] Fix | Delete
print " $sections{$1}";
[20] Fix | Delete
next;
[21] Fix | Delete
}
[22] Fix | Delete
[23] Fix | Delete
print " -s $2 $sections{$1}"
[24] Fix | Delete
if ($sections{$1} ne '0x0' and $sections{$1} ne '');
[25] Fix | Delete
};
[26] Fix | Delete
close (READELF);
[27] Fix | Delete
print "\n";
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function