equal
deleted
inserted
replaced
252 else { |
252 else { |
253 return "Unknown COFF object"; |
253 return "Unknown COFF object"; |
254 } |
254 } |
255 } |
255 } |
256 |
256 |
257 if ($typeBuf =~ /^!<arch>\x0A(.{48}([0-9 ]{10})\x60\x0A(......))/s) { |
257 if ($typeBuf =~ /^!<arch>\x0A(.{48}([0-9 ]{9}).\x60\x0A(......))/s) { |
258 # library - could be MARM or WINS |
258 # library - could be MARM or WINS |
259 |
259 |
260 $typeBuf = $1; |
260 $typeBuf = $1; |
261 my $member_start = 8; |
261 my $member_start = 8; |
262 |
262 |
263 open (FILE, $file) or die "Error: Couldn't open \"$file\" for reading: $!\n"; |
263 open (FILE, $file) or die "Error: Couldn't open \"$file\" for reading: $!\n"; |
264 binmode (FILE); |
264 binmode (FILE); |
265 |
265 |
266 while ($typeBuf =~ /^.{48}([0-9 ]{10})\x60\x0A(......)/s) { |
266 while ($typeBuf =~ /^.{48}([0-9 ]{9}).\x60\x0A(......)/s) { |
267 # $1 is the size of the archive member, $2 is first 6 bytes of the file |
267 # $1 is the size of the archive member, $2 is first 6 bytes of the file |
268 # There may be several different sorts of file in the archive, and we |
268 # There may be several different sorts of file in the archive, and we |
269 # need to scan through until we find a type we recognize: |
269 # need to scan through until we find a type we recognize: |
270 # $2 == 0x0A00 would be ARM COFF, 0x014C would be Intel COFF |
270 # $2 == 0x0A00 would be ARM COFF, 0x014C would be Intel COFF |
271 if ($2 =~ /^\x00\x0A/) { |
271 if ($2 =~ /^\x00\x0A/) { |