#!/usr/bin/perl open (DATA, "elfdump -h @ARGV[0]|"); while () { 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);