1 # RUN: yaml2obj %s -o %t.o
2 # RUN: not llvm-objcopy -R .foo %t.o %t1 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR1 -DINPUT=%t.o
4 # RUN: not llvm-strip --no-strip-all -R .foo %t2 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR2 -DINPUT=%t2
19 # ERR1: error: '[[INPUT]]': section '.foo' cannot be removed because it is referenced by the section '.bar'
20 # ERR2: error: '[[INPUT]]': section '.foo' cannot be removed because it is referenced by the section '.bar'
22 # RUN: llvm-objcopy --allow-broken-links -R .foo %t.o %t3
23 # RUN: llvm-readobj --sections %t3 | FileCheck %s --check-prefix=SECTIONS --implicit-check-not=.foo
25 # RUN: llvm-strip --no-strip-all --allow-broken-links -R .foo %t4
26 # RUN: llvm-readobj --sections %t4 | FileCheck %s --check-prefix=SECTIONS --implicit-check-not=.foo
28 # SECTIONS: Name: .bar