1# REQUIRES: x86 2# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o 3# RUN: %lld -lSystem -o %t.out %t.o -dead_strip 4# RUN: llvm-otool -l %t.out | FileCheck --check-prefix=SECT %s 5# RUN: llvm-otool -vs __TEXT __cstring %t.out | FileCheck %s 6 7# SECT: sectname __cstring 8# SECT-NEXT: segname __TEXT 9# SECT-NEXT: addr 10# SECT-NEXT: size 11# SECT-NEXT: offset 12# SECT-NEXT: align 2^4 (16) 13 14# CHECK: 0 \303Q043\005\376\334\272\230vT2\020\001 15# CHECK: 8 def 16 17.section __TEXT,__cstring,cstring_literals 18.globl _foo 19_foo: # Dead. External, has symbol table entry, gets stripped. 20 .asciz "asdf" 21 22.globl _hi 23_hi: 24 .asciz "hi" # External, has symbol table entry. 25 26.p2align 4 27L_internal_aligned_16: # Has no symbol table entry. 28 .asciz "\303Q043\005\376\334\272\230vT2\020\001" 29 30L_internal_nonaligned: 31 .asciz "abc" 32 33.p2align 3 34L_internal_aligned_8: 35 .asciz "def" 36 37.text 38.globl _main 39_main: 40 movq _hi(%rip), %rax 41 movq L_internal_nonaligned(%rip), %rax 42 movq L_internal_aligned_8(%rip), %rax 43 movaps L_internal_aligned_16(%rip), %xmm0 44 retq 45 46.subsections_via_symbols 47