`__cfstring` is a special literal section, so instead of breaking it up at symbol boundaries, we break it up at fixed-width boundaries (since each literal is the same size). Symbols can only occur at one of those boundaries, so this is strictly more powerful than `.subsections_via_symbols`. With that in place, we then run the section through ICF. This change is about perf-neutral when linking chromium_framework. Reviewed By: #lld-macho, gkm Differential Revision: https://reviews.llvm.org/D105045
20 lines
510 B
ArmAsm
20 lines
510 B
ArmAsm
# REQUIRES: x86
|
|
# RUN: rm -rf %t; mkdir %t
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/test.o
|
|
# RUN: not %lld -dylib -framework CoreFoundation --icf=all %t/test.o 2>&1 | FileCheck %s
|
|
# CHECK: error: {{.*}}test.o: __cfstring contains symbol _uh_oh at misaligned offset
|
|
|
|
.cstring
|
|
L_.str:
|
|
.asciz "foo"
|
|
|
|
.section __DATA,__cfstring
|
|
.p2align 3
|
|
L__unnamed_cfstring_:
|
|
.quad ___CFConstantStringClassReference
|
|
.long 1992 ## utf-8
|
|
_uh_oh:
|
|
.space 4
|
|
.quad L_.str
|
|
.quad 3 ## strlen
|