2 # RUN: rm -rf %t; split-file %s %t
4 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/strings.s -o %t/strings.o
5 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/main.s -o %t/main.o
7 # RUN: %lld -arch arm64 -lSystem -o %t.out %t/strings.o %t/main.o --no-deduplicate-strings
9 # RUN: llvm-otool -vs __TEXT __cstring %t.out | FileCheck %s --check-prefix=CSTRING
10 # RUN: llvm-otool -vs __TEXT __objc_methname %t.out | FileCheck %s --check-prefix=METHNAME
12 # RUN: %lld -arch arm64 -lSystem -o %t/duplicates %t/strings.o %t/strings.o %t/main.o
14 # RUN: llvm-otool -vs __TEXT __cstring %t/duplicates | FileCheck %s --check-prefix=CSTRING
15 # RUN: llvm-otool -vs __TEXT __objc_methname %t/duplicates | FileCheck %s --check-prefix=METHNAME
17 # CSTRING: Contents of (__TEXT,__cstring) section
18 # CSTRING-NEXT: existing-cstring
21 # METHNAME: Contents of (__TEXT,__objc_methname) section
22 # METHNAME-NEXT: existing_methname
23 # METHNAME-NEXT: synthetic_methname
29 .asciz "existing-cstring"
31 .section __TEXT,__objc_methname,cstring_literals
32 .asciz "existing_methname"
42 bl _objc_msgSend$existing_methname
43 bl _objc_msgSend$synthetic_methname