24 lines
386 B
Perl
Executable File
24 lines
386 B
Perl
Executable File
#!/usr/bin/perl
|
|
|
|
open (DATA, "elfdump -h @ARGV[0]|");
|
|
|
|
while (<DATA>) {
|
|
chop;
|
|
($number, $event, $address, $value1, $value2, $section)=split;
|
|
if ($section eq '.text') {
|
|
$tadd = $address;
|
|
}
|
|
if ($section eq '.data') {
|
|
$dadd = $address;
|
|
}
|
|
}
|
|
|
|
$data = hex($dadd);
|
|
$text = hex($tadd);
|
|
|
|
if ($data < $text) {
|
|
print "ERROR : In @ARGV[0] data & text section problem\n";
|
|
}
|
|
|
|
close(DATA);
|