Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my @binaries = qw[
- /boot/vmlinuz-linux
- /usr/bin/bash
- /usr/bin/tar
- /usr/bin/gzip
- /usr/bin/geany
- /usr/bin/python
- /usr/bin/perl
- /usr/bin/thunar
- /usr/bin/firefox
- /usr/lib/xorg/modules/drivers/radeon_drv.so
- /usr/bin/git
- ];
- for $input (sort @binaries) {
- unless (-e $input) {
- warn "Skipping $input.\n";
- next;
- }
- open STDIN, "-|", "objdump -d $input";
- my $sum = 0;
- my $count = 0;
- for (<>) {
- unless (m/\(bad\)/) {
- if (m/:\t([^\t]*)\t/) {
- $sum += scalar(split / /, ($1 =~ s/ *$//r));
- ++$count;
- }
- }
- }
- print "Average for $input = ", $sum / $count, "\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment