blob: 4aac930e46986a54ad98acbb4713124e755d2713 [file] [log] [blame]
Jake Ehrlich36a2eb32017-10-10 18:47:09 +00001# RUN: yaml2obj %s > %t
Seiya Nutaada9d2d82019-05-23 00:42:46 +00002# RUN: not llvm-objcopy -R .strtab %t %t2 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR1 -DINPUT=%t
James Henderson66a9d0f2019-04-18 09:13:30 +00003# RUN: cp %t %t3
Seiya Nutaada9d2d82019-05-23 00:42:46 +00004# RUN: not llvm-strip --no-strip-all -R .strtab %t3 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR2 -DINPUT=%t3
Jake Ehrlich36a2eb32017-10-10 18:47:09 +00005
6!ELF
7FileHeader:
8 Class: ELFCLASS64
9 Data: ELFDATA2LSB
10 Type: ET_REL
11 Machine: EM_X86_64
George Rimar27799872019-10-20 14:47:17 +000012Symbols: []
Jake Ehrlich36a2eb32017-10-10 18:47:09 +000013
Seiya Nutaada9d2d82019-05-23 00:42:46 +000014# 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'
James Henderson66a9d0f2019-04-18 09:13:30 +000016
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
James Hendersone4a89a12019-05-02 11:53:02 +000020# RUN: llvm-strip --no-strip-all --allow-broken-links -R .strtab %t %t5
James Henderson66a9d0f2019-04-18 09:13:30 +000021# RUN: llvm-objdump --section-headers %t5 | FileCheck %s --check-prefix=SECTIONS --implicit-check-not=.strtab
22
23# SECTIONS: .symtab