Skip to content

Commit

Permalink
Added a few test files from my system, and output generation for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kentfredric committed May 31, 2009
1 parent 7f23900 commit 0352a9f
Show file tree
Hide file tree
Showing 7 changed files with 15,336 additions and 0 deletions.
29 changes: 29 additions & 0 deletions ELF-Extract-Sections/t/test_files/gen_expected.pl
Original file line number Diff line number Diff line change
@@ -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);
}
Empty file modified ELF-Extract-Sections/t/test_files/libc.so.6
100755 → 100644
Empty file.
Loading

0 comments on commit 0352a9f

Please sign in to comment.