45 lines · plain
1# REQUIRES: aarch642# RUN: rm -rf %t; split-file %s %t3 4# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/strings.s -o %t/strings.o5# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/main.s -o %t/main.o6 7# RUN: %lld -arch arm64 -lSystem -o %t.out %t/strings.o %t/main.o --no-deduplicate-strings8 9# RUN: llvm-otool -vs __TEXT __cstring %t.out | FileCheck %s --check-prefix=CSTRING10# RUN: llvm-otool -vs __TEXT __objc_methname %t.out | FileCheck %s --check-prefix=METHNAME11 12# RUN: %lld -arch arm64 -lSystem -o %t/duplicates %t/strings.o %t/strings.o %t/main.o13 14# RUN: llvm-otool -vs __TEXT __cstring %t/duplicates | FileCheck %s --check-prefix=CSTRING15# RUN: llvm-otool -vs __TEXT __objc_methname %t/duplicates | FileCheck %s --check-prefix=METHNAME16 17# CSTRING: Contents of (__TEXT,__cstring) section18# CSTRING-NEXT: existing-cstring19# CSTRING-EMPTY:20 21# METHNAME: Contents of (__TEXT,__objc_methname) section22# METHNAME-NEXT: existing_methname23# METHNAME-NEXT: synthetic_methname24# METHNAME-EMPTY:25 26#--- strings.s27.cstring28.p2align 229 .asciz "existing-cstring"30 31.section __TEXT,__objc_methname,cstring_literals32 .asciz "existing_methname"33 34#--- main.s35.text36.globl _objc_msgSend37_objc_msgSend:38 ret39 40.globl _main41_main:42 bl _objc_msgSend$existing_methname43 bl _objc_msgSend$synthetic_methname44 ret45