1 # RUN: yaml2obj %s -o %t
2 # RUN: not llvm-objcopy -R .symtab %t %t2 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR1 -DINPUT=%t
4 # RUN: not llvm-strip --no-strip-all -R .symtab %t3 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR2 -DINPUT=%t3
6 # RUN: yaml2obj -DTYPE=SHT_CREL %s -o %t.crel
7 # RUN: not llvm-objcopy -R .symtab %t.crel %t2.crel 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR1 -DINPUT=%t.crel
18 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
20 AddressAlign: 0x0000000000000010
21 Content: "0000000000000000"
23 Type: [[TYPE=SHT_REL]]
37 # ERR1: error: '[[INPUT]]': symbol table '.symtab' cannot be removed because it is referenced by the relocation section '.rel.text'
38 # ERR2: error: '[[INPUT]]': symbol table '.symtab' cannot be removed because it is referenced by the relocation section '.rel.text'
40 # RUN: llvm-objcopy --allow-broken-links -R .symtab %t %t4
41 # RUN: llvm-readobj --sections %t4 | FileCheck %s --check-prefix=SECTIONS --implicit-check-not=.symtab
43 # RUN: llvm-strip --no-strip-all --allow-broken-links -R .symtab %t5
44 # RUN: llvm-readobj --sections %t5 | FileCheck %s --check-prefix=SECTIONS --implicit-check-not=.symtab
46 # RUN: llvm-objcopy --allow-broken-links -R .symtab %t.crel %t4.crel
47 # RUN: llvm-readobj --sections %t4.crel | FileCheck %s --check-prefix=SECTIONS --implicit-check-not=.symtab
48 # RUN: cp %t.crel %t5.crel
49 # RUN: llvm-strip --no-strip-all --allow-broken-links -R .symtab %t5.crel
50 # RUN: llvm-readobj --sections %t5.crel | FileCheck %s --check-prefix=SECTIONS --implicit-check-not=.symtab
52 # SECTIONS: Name: .rel.text