1 ## Check that we can copy an object that has a relocation
2 ## with a symbol index of 0 even when there is no symbol table.
4 # RUN: yaml2obj --docnum=1 %s -o %t1
5 # RUN: llvm-objcopy %t1 %t2
6 # RUN: llvm-readobj --relocations %t2 | FileCheck %s
9 # CHECK-NEXT: Section {{.*}} .rel.text {
10 # CHECK-NEXT: 0x1000 R_X86_64_RELATIVE -
23 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
29 Type: R_X86_64_RELATIVE
31 ## Check that we report an error when a relocation refers to a
32 ## non-zero symbol index but there is no symbol table.
34 # RUN: yaml2obj --docnum=2 %s -o %t3
35 # RUN: not llvm-objcopy %t3 /dev/null 2>&1 | FileCheck %s --check-prefix=ERR
37 # ERR: error: '.rel.text': relocation references symbol with index 1, but there is no symbol table
48 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]