Permalink
Browse files

Added a few test files from my system, and output generation for tests

  • Loading branch information...
1 parent 7f23900 commit 0352a9f73aab2a841c97097636f3d07e2574f755 @kentfredric kentfredric committed May 31, 2009
@@ -0,0 +1,29 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use FindBin;
+use File::Find::Rule;
+use YAML::XS;
+use Path::Class qw( file dir );
+use lib "$FindBin::Bin/../../lib";
+use ELF::Extract::Sections;
+
+my $exclude = File::Find::Rule->name( "*.pl", "*.yaml" );
+my @files = File::Find::Rule->file->not($exclude)->in("$FindBin::Bin");
+for my $file (@files) {
+ my $f = file($file);
+ my $yamlfile = file( $file . ".yaml" );
+
+ my $scanner = ELF::Extract::Sections->new( file => $f );
+ my $d = {};
+ for ( values %{ $scanner->sections } ) {
+ $d->{ $_->name } = {
+ size => $_->size,
+ offset => $_->offset,
+ };
+ }
+ my $fh = $yamlfile->openw;
+ print $fh YAML::XS::Dump($d);
+}
View
No changes.
Oops, something went wrong.

0 comments on commit 0352a9f

Please sign in to comment.