36 lines · plain
1# RUN: yaml2obj %s -o %t2 3## Verify that section is dumped before it is removed.4# RUN: llvm-objcopy --dump-section .test2=%t1.dump -R .test2 %t %t15# RUN: od -t x1 %t1.dump | FileCheck %s --ignore-case --match-full-lines6 7# CHECK: 0000000 de ad be ef8# CHECK-NEXT: 00000049 10## Verify that the newly added section is not dumped.11# RUN: echo CAFE > %t3.txt12# RUN: not llvm-objcopy --dump-section .test3=%t3.dump --add-section .test3=%t3.txt %t %t3 2>&1 | \13# RUN: FileCheck %s --check-prefix=NODUMP -DINPUT=%t14 15# NODUMP: error: '[[INPUT]]': section '.test3' not found16 17!ELF18FileHeader:19 Class: ELFCLASS6420 Data: ELFDATA2LSB21 Type: ET_REL22 Machine: EM_X86_6423Sections:24 - Name: .test125 Type: SHT_PROGBITS26 Flags: [ ]27 - Name: .test228 Type: SHT_PROGBITS29 Flags: [ ]30 Content: "DEADBEEF"31 - Name: .test432 Type: SHT_PROGBITS33 Flags: [ ]34 Content: "BEEFDEAD"35Symbols: []36