2 # RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o %t %s
3 # RUN: llvm-jitlink -debug-only=jitlink -noexec -entry hook %t 2>&1 | \
6 # Verify that we split C string literals on null-terminators, rather than on
7 # symbol boundaries. We expect four dead-stripped symbols: l_str.0, l_str.2,
8 # L_str.3, l_str.4, and the auto-generated symbol for the start of the "defghi"
9 # string. We also verify that there are only two dead-stripped blocks, since
10 # l_str.3 should not have split the block started at "def"... (since this is a
11 # C string section we should be splitting on null characters instead of
14 # CHECK: Dead-stripping defined symbols:
15 # CHECK-NEXT: linkage: strong, scope: local, dead
16 # CHECK-NEXT: linkage: strong, scope: local, dead
17 # CHECK-NEXT: linkage: strong, scope: local, dead
18 # CHECK-NEXT: linkage: strong, scope: local, dead
19 # CHECK-NEXT: Dead-stripping blocks:
20 # CHECK-NEXT: content, align = 1, align-ofs = 0, section = __TEXT,__cstring
21 # CHECK-NEXT: content, align = 1, align-ofs = 0, section = __TEXT,__cstring
22 # CHECK-NEXT: Removing unused external symbols
24 .section __DATA,__data
30 .section __TEXT,__cstring,cstring_literals
36 # anonymous start for "defghi", split in the middle by l_str.3. We expect this
37 # to be dead-stripped as a single block.
44 .subsections_via_symbols