47 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o3# RUN: %lld -lSystem -o %t.out %t.o -dead_strip4# RUN: llvm-otool -l %t.out | FileCheck --check-prefix=SECT %s5# RUN: llvm-otool -vs __TEXT __cstring %t.out | FileCheck %s6 7# SECT: sectname __cstring8# SECT-NEXT: segname __TEXT9# SECT-NEXT: addr10# SECT-NEXT: size11# SECT-NEXT: offset12# SECT-NEXT: align 2^4 (16)13 14# CHECK: 0 \303Q043\005\376\334\272\230vT2\020\00115# CHECK: 8 def16 17.section __TEXT,__cstring,cstring_literals18.globl _foo19_foo: # Dead. External, has symbol table entry, gets stripped.20 .asciz "asdf"21 22.globl _hi23_hi:24 .asciz "hi" # External, has symbol table entry.25 26.p2align 427L_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 334L_internal_aligned_8:35 .asciz "def"36 37.text38.globl _main39_main:40 movq _hi(%rip), %rax41 movq L_internal_nonaligned(%rip), %rax42 movq L_internal_aligned_8(%rip), %rax43 movaps L_internal_aligned_16(%rip), %xmm044 retq45 46.subsections_via_symbols47