1 ## Show that llvm-objcopy extracts section contents into files specified by
4 # RUN: yaml2obj %s -o %t
6 ## Extract section contents into files.
7 # RUN: llvm-objcopy --dump-section __TEXT,__text=%t.dump.text \
8 # RUN: --dump-section __DATA,__data=%t.dump.data %t
9 # RUN: od -t x1 %t.dump.text | FileCheck %s --check-prefix=TEXT-CONTENT
10 # RUN: wc -c %t.dump.text | FileCheck %s --check-prefix=TEXT-SIZE
11 # RUN: od -t x1 %t.dump.data | FileCheck %s --check-prefix=DATA-CONTENT
12 # RUN: wc -c %t.dump.data | FileCheck %s --check-prefix=DATA-SIZE
14 # TEXT-CONTENT: 0000000 aa bb cc dd
16 # DATA-CONTENT: 0000000 ee ff ee ff
19 ## Error case: A non-existent section name.
20 # RUN: not llvm-objcopy --dump-section __TEXT,__foo=%t.no-such-section %t 2>&1 \
21 # RUN: | FileCheck %s -DINPUT=%t --check-prefix=NO-SUCH-SECTION
22 # NO-SUCH-SECTION: error: '[[INPUT]]': section '__TEXT,__foo' not found
28 cpusubtype: 0x00000003
49 addr: 0x0000000000000000
61 addr: 0x0000000000000004
73 addr: 0x0000000000000008