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