## Test that llvm-objcopy can read a COFF object with symbols but without a
## symbol table.
# RUN: yaml2obj %p/Inputs/no-symbol-table.yaml -o %t.obj
## Check that we report a single symbol before overriding the symbol table pointer.
# RUN: llvm-readobj --file-headers %t.obj | FileCheck %s --check-prefix=BEFORE
# BEFORE: SymbolCount: 1
## Override the symbol table pointer with zeros.
# RUN: %python -c "with open(r'%t.obj', 'r+b') as input: input.seek(8); input.write(b'\x00' * 4)"
# RUN: llvm-readobj --file-headers %t.obj | FileCheck %s --check-prefix=POINTER
# POINTER: PointerToSymbolTable: 0x0
## Make sure we can run llvm-objcopy on the resulting object.
# RUN: llvm-objcopy %t.obj
## Check that the number of symbols is now reported as zero.
# RUN: llvm-readobj --file-headers %t.obj | FileCheck %s --check-prefix=COUNT
# COUNT: SymbolCount: 0