41 lines · plain
1## Check that llvm-objcopy reports a suitable error when it can't find the2## section to extract.3 4## We can't extract a part that doesn't exist.5# RUN: yaml2obj %s --docnum=1 -o %t16# RUN: not llvm-objcopy %t1 --extract-section=UNKNOWN=%t.unknown.out 2>&1 | FileCheck %s -DFILE=%t1 --check-prefix=ERROR17 8# ERROR1: error: '[[FILE]]': part 'UNKNOWN' not found9 10--- !dxcontainer11Header:12 Hash: [ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,13 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 ]14 Version:15 Major: 116 Minor: 017 PartCount: 118Parts:19 - Name: FKE020 Size: 821...22 23## We can't extract a part that is specified incorrectly.24# RUN: yaml2obj %s --docnum=2 -o %t225# RUN: not llvm-objcopy %t2 --extract-section=FKE0,%t.fke0.out 2>&1 | FileCheck %s -DFILE=%t2 --check-prefix=ERROR226 27# ERROR2: error: bad format for --extract-section, expected section=file28 29--- !dxcontainer30Header:31 Hash: [ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,32 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 ]33 Version:34 Major: 135 Minor: 036 PartCount: 137Parts:38 - Name: FKE039 Size: 840...41