1# RUN: yaml2obj %s -o %t 2# RUN: not llvm-objcopy -R .strtab %t %t2 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR1 -DINPUT=%t 3# RUN: cp %t %t3 4# RUN: not llvm-strip --no-strip-all -R .strtab %t3 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR2 -DINPUT=%t3 5 6!ELF 7FileHeader: 8 Class: ELFCLASS64 9 Data: ELFDATA2LSB 10 Type: ET_REL 11 Machine: EM_X86_64 12Symbols: [] 13 14# ERR1: error: '[[INPUT]]': string table '.strtab' cannot be removed because it is referenced by the symbol table '.symtab' 15# ERR2: error: '[[INPUT]]': string table '.strtab' cannot be removed because it is referenced by the symbol table '.symtab' 16 17# RUN: llvm-objcopy --allow-broken-links -R .strtab %t %t4 18# RUN: llvm-objdump --section-headers %t4 | FileCheck %s --check-prefix=SECTIONS --implicit-check-not=.strtab 19# RUN: cp %t %t5 20# RUN: llvm-strip --no-strip-all --allow-broken-links -R .strtab %t %t5 21# RUN: llvm-objdump --section-headers %t5 | FileCheck %s --check-prefix=SECTIONS --implicit-check-not=.strtab 22 23# SECTIONS: .symtab 24