1# RUN: not llvm-objcopy -R .dynstr %p/Inputs/dynsym.so %t 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR1 -DINPUT=%p/Inputs/dynsym.so 2# RUN: cp %p/Inputs/dynsym.so %t2 3# RUN: not llvm-strip --no-strip-all -R .dynstr %t2 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR2 -DINPUT=%t2 4 5# ERR1: error: '[[INPUT]]': section '.dynstr' cannot be removed because it is referenced by the section '.dynsym' 6# ERR2: error: '[[INPUT]]': section '.dynstr' cannot be removed because it is referenced by the section '.dynsym' 7 8# RUN: llvm-objcopy --allow-broken-links -R .dynstr %p/Inputs/dynsym.so %t3 9# RUN: llvm-objdump --section-headers %t3 | FileCheck %s --check-prefix=SECTIONS --implicit-check-not=.dynstr 10# RUN: cp %p/Inputs/dynsym.so %t4 11# RUN: llvm-strip --no-strip-all --allow-broken-links -R .dynstr %t4 12# RUN: llvm-objdump --section-headers %t4 | FileCheck %s --check-prefix=SECTIONS --implicit-check-not=.dynstr 13 14# SECTIONS: .dynsym 15# SECTIONS: .dynamic 16