1 ## This test checks updating a dynamic shared library ID in a MachO binary.
3 # RUN: yaml2obj %s --docnum=1 -o %t
5 ## Specifying -id once:
6 # RUN: llvm-install-name-tool -id /usr/lib/A_long_long_test %t
7 # RUN: llvm-objdump -p %t | FileCheck %s --check-prefix=ID --implicit-check-not='name /usr'
9 # ID: name /usr/lib/A_long_long_test
11 ## Specifying -id more than once:
12 # RUN: llvm-install-name-tool -id /usr/lib/B_long -id /usr/lib/K_long -id /usr/A_short %t
13 # RUN: llvm-objdump -p %t | FileCheck %s --check-prefix=ID-MULTIPLE --implicit-check-not='name /usr'
15 # ID-MULTIPLE: name /usr/A_short
17 ## Specifying -id with empty string:
18 # RUN: not llvm-install-name-tool -id '' %t 2>&1 | \
19 # RUN: FileCheck %s --check-prefix=EMPTY
21 # EMPTY: cannot specify an empty id
23 ## Missing id argument:
24 # RUN: not llvm-install-name-tool %t -id 2>&1 | \
25 # RUN: FileCheck %s --check-prefix=MISSING
27 # MISSING: missing argument to -id option
29 ## Shared dylib binary
34 cpusubtype: 0x00000003
46 current_version: 82115073
47 compatibility_version: 65536
50 # RUN: yaml2obj %s --docnum=2 -o %t
52 ## Check that -id option has no effect if binary is not a shared dylib:
54 # RUN: llvm-install-name-tool -id /usr/lib/J %t
62 cpusubtype: 0x00000003