: Binary(Binary::ID_Archive, source) {
// Check for sufficient magic.
if (!source || source->getBufferSize()
- < (8 + sizeof(ArchiveMemberHeader) + 2) // Smallest archive.
+ < (8 + sizeof(ArchiveMemberHeader)) // Smallest archive.
|| StringRef(source->getBufferStart(), 8) != Magic) {
ec = object_error::invalid_file_type;
return;
Test we don't error with an archive with no symtab.
RUN: llvm-nm %p/Inputs/archive-test.a-gnu-no-symtab
+Or in an archive with no symtab or string table.
+RUN: llvm-nm %p/Inputs/archive-test.a-gnu-minimal
+
COFF: trivial-object-test.coff-i386:
COFF-NEXT: 00000000 d .data
COFF-NEXT: 00000000 t .text