bintools/evalid/EvalidCompare.pm
changeset 655 3f65fd25dfd4
parent 621 96fee2635b19
child 662 60be34e1b006
child 664 44b0e894b7ab
equal deleted inserted replaced
649:02d78c9f018e 655:3f65fd25dfd4
   238     my $member_start = 8;
   238     my $member_start = 8;
   239 
   239 
   240     open (FILE, $file) or die "Error: Couldn't open \"$file\" for reading: $!\n";
   240     open (FILE, $file) or die "Error: Couldn't open \"$file\" for reading: $!\n";
   241     binmode (FILE);
   241     binmode (FILE);
   242     
   242     
   243     while ($typeBuf =~ /^.{48}([0-9 ]{9})\x60\x0A(......)/s) {
   243     while ($typeBuf =~ /^.{48}([0-9 ]{9}).\x60\x0A(......)/s) {
   244       # $1 is the size of the archive member, $2 is first 6 bytes of the file
   244       # $1 is the size of the archive member, $2 is first 6 bytes of the file
   245       # There may be several different sorts of file in the archive, and we
   245       # There may be several different sorts of file in the archive, and we
   246       # need to scan through until we find a type we recognize:
   246       # need to scan through until we find a type we recognize:
   247       # $2 == 0x0A00 would be ARM COFF, 0x014C would be Intel COFF
   247       # $2 == 0x0A00 would be ARM COFF, 0x014C would be Intel COFF
   248       if ($2 =~ /^\x00\x0A/) {
   248       if ($2 =~ /^\x00\x0A/) {