equal
deleted
inserted
replaced
229 else { |
229 else { |
230 return "Unknown COFF object"; |
230 return "Unknown COFF object"; |
231 } |
231 } |
232 } |
232 } |
233 |
233 |
234 if ($typeBuf =~ /^!<arch>\x0A(.{48}([0-9 ]{10})\x60\x0A(......))/s) { |
234 if ($typeBuf =~ /^!<arch>\x0A(.{48}([0-9 ]{9})\x60\x0A(......))/s) { |
235 # library - could be MARM or WINS |
235 # library - could be MARM or WINS |
236 |
236 |
237 $typeBuf = $1; |
237 $typeBuf = $1; |
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 ]{10})\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/) { |