1 # RUN: yaml2obj %s > %t
4 # RUN: llvm-objcopy --build-id-link-dir=%t-dir %t %t2
5 # RUN: not test -e %t-dir/4f/cb712aa6387724a9f465a32cd8c14b
7 # RUN: llvm-objcopy --build-id-link-dir=%t-dir --build-id-link-input=.debug %t %t3
8 # RUN: cmp %t-dir/4f/cb712aa6387724a9f465a32cd8c14b.debug %t
9 # RUN: rm %t-dir/4f/cb712aa6387724a9f465a32cd8c14b.debug
11 # RUN: llvm-objcopy --build-id-link-dir=%t-dir --build-id-link-output "" --strip-sections %t %t4
12 # RUN: cmp %t-dir/4f/cb712aa6387724a9f465a32cd8c14b %t4
13 # RUN: rm %t-dir/4f/cb712aa6387724a9f465a32cd8c14b
15 # Linking the output of an inplace argument means that the file in the build-id
16 # directory will be hard-linked to the resulting file.
18 # RUN: llvm-objcopy --build-id-link-dir=%t-dir --build-id-link-output "" --strip-sections %t5
19 # RUN: cmp %t-dir/4f/cb712aa6387724a9f465a32cd8c14b %t5
20 # RUN: rm %t-dir/4f/cb712aa6387724a9f465a32cd8c14b
22 # Linking the input of an inplace argument means that the file in the build-id
23 # directory will be hard-linked to the original file.
25 # RUN: llvm-objcopy --build-id-link-dir=%t-dir --build-id-link-input=.debug --strip-sections %t6
26 # RUN: cmp %t-dir/4f/cb712aa6387724a9f465a32cd8c14b.debug %t
27 # RUN: rm %t-dir/4f/cb712aa6387724a9f465a32cd8c14b.debug
29 # You can use both at once.
30 # RUN: llvm-objcopy --build-id-link-dir=%t-dir --build-id-link-output "" --build-id-link-input=.debug --strip-sections %t %t7
31 # RUN: cmp %t-dir/4f/cb712aa6387724a9f465a32cd8c14b.debug %t
32 # RUN: cmp %t-dir/4f/cb712aa6387724a9f465a32cd8c14b %t7
33 # RUN: rm %t-dir/4f/cb712aa6387724a9f465a32cd8c14b.debug
34 # RUN: rm %t-dir/4f/cb712aa6387724a9f465a32cd8c14b
36 # --build-id-link-output can have a suffix as well
37 # RUN: llvm-objcopy --build-id-link-dir=%t-dir --build-id-link-output=.debug --only-keep-debug %t %t8
38 # RUN: cmp %t-dir/4f/cb712aa6387724a9f465a32cd8c14b.debug %t8
39 # RUN: rm %t-dir/4f/cb712aa6387724a9f465a32cd8c14b.debug
48 - Name: .note.gnu.build-id
51 Content: 040000001000000003000000474E55004FCB712AA6387724A9F465A32CD8C14B
56 - Section: .note.gnu.build-id