1 ## Check we report warnings when relocations are broken.
3 # RUN: yaml2obj --docnum=1 %s -o %t1
4 # RUN: llvm-readobj --relocs --expand-relocs %t1 2>&1 | \
5 # RUN: FileCheck %s -DFILE=%t1 --check-prefix=INVALID-REL
7 # INVALID-REL: Relocations [
8 # INVALID-REL-NEXT: warning: '[[FILE]]': The end of the file was unexpectedly encountered: relocations with offset 0x222 and size 0x0 go past the end of the file
17 ## Case 1: Incorrect offset to relocation entries.
18 FileOffsetToRelocations: 0x222
20 # RUN: yaml2obj --docnum=2 %s -o %t2
21 # RUN: llvm-readobj --relocs --expand-relocs %t2 2>&1 | \
22 # RUN: FileCheck %s -DFILE=%t2 --check-prefix=INVALID-SYM
24 # INVALID-SYM: Relocations [
25 # INVALID-SYM-NEXT: Section (index: 1) .text {
26 # INVALID-SYM-NEXT: warning: '[[FILE]]': symbol index 33 exceeds symbol count 0
38 ## Case 2: There is no symbol with index 0x21.