1# REQUIRES: aarch64 2# RUN: rm -rf %t; split-file %s %t 3 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 6 7# RUN: %lld -arch arm64 -lSystem -o %t.out %t/strings.o %t/main.o --no-deduplicate-strings 8 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 11 12# RUN: %lld -arch arm64 -lSystem -o %t/duplicates %t/strings.o %t/strings.o %t/main.o 13 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 16 17# CSTRING: Contents of (__TEXT,__cstring) section 18# CSTRING-NEXT: existing-cstring 19# CSTRING-EMPTY: 20 21# METHNAME: Contents of (__TEXT,__objc_methname) section 22# METHNAME-NEXT: existing_methname 23# METHNAME-NEXT: synthetic_methname 24# METHNAME-EMPTY: 25 26#--- strings.s 27.cstring 28.p2align 2 29 .asciz "existing-cstring" 30 31.section __TEXT,__objc_methname,cstring_literals 32 .asciz "existing_methname" 33 34#--- main.s 35.text 36.globl _objc_msgSend 37_objc_msgSend: 38 ret 39 40.globl _main 41_main: 42 bl _objc_msgSend$existing_methname 43 bl _objc_msgSend$synthetic_methname 44 ret 45