| # RUN: not llvm-objcopy -R .symtab %t %t2 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR1 -DINPUT=%t |
| # RUN: not llvm-strip --no-strip-all -R .symtab %t3 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR2 -DINPUT=%t3 |
| Flags: [ SHF_ALLOC, SHF_EXECINSTR ] |
| AddressAlign: 0x0000000000000010 |
| Content: "0000000000000000" |
| # ERR1: error: '[[INPUT]]': symbol table '.symtab' cannot be removed because it is referenced by the relocation section '.rel.text' |
| # ERR2: error: '[[INPUT]]': symbol table '.symtab' cannot be removed because it is referenced by the relocation section '.rel.text' |
| # RUN: llvm-objcopy --allow-broken-links -R .symtab %t %t4 |
| # RUN: llvm-readobj --sections %t4 | FileCheck %s --check-prefix=SECTIONS --implicit-check-not=.symtab |
| # RUN: llvm-strip --no-strip-all --allow-broken-links -R .symtab %t5 |
| # RUN: llvm-readobj --sections %t5 | FileCheck %s --check-prefix=SECTIONS --implicit-check-not=.symtab |
| # SECTIONS: Name: .rel.text |