1 # RUN: yaml2obj --docnum=1 %s > %t
2 # RUN: llvm-objdump --reloc %t > %t1
3 # RUN: llvm-objdump -r %t > %t2
5 # RUN: FileCheck %s --input-file=%t1
7 # CHECK: RELOCATION RECORDS FOR [.text]:
8 # CHECK-NEXT: 0000000000000001 R_X86_64_32 glob1
9 # CHECK-NEXT: 0000000000000001 R_X86_64_32S glob2
10 # CHECK-NEXT: 0000000000000002 R_X86_64_64 loc1
11 # CHECK-NEXT: 0000000000000001 R_X86_64_32 glob1+1
12 # CHECK-NEXT: 0000000000000001 R_X86_64_32S glob2+2
13 # CHECK-NEXT: 0000000000000002 R_X86_64_64 loc1+3
16 FileHeader: !FileHeader
25 Content: "0000000000000000"
74 ## Check we report an error if the relocated section identified by the
75 ## sh_info field of a relocation section is invalid.
76 # RUN: yaml2obj --docnum=2 %s > %t2
77 # RUN: not llvm-objdump --reloc %t2 2>&1 | FileCheck %s -DFILE=%t2 --check-prefix=ERR
78 # ERR: error: '[[FILE]]': section (1): unable to get a relocation target: invalid section index: 255