2 # RUN: split-file %s %t
3 # RUN: llvm-mc -filetype=obj -triple=x86_64 %t/a.s -o %t/a.o
4 # RUN: llvm-mc -filetype=obj -triple=x86_64 %t/b.s -o %t/b.o
6 ## Non-empty local symbol names are not deduplicated. This helps parallel
7 ## .symtab write. We used to perform deduplication at -O2.
8 # RUN: ld.lld %t/a.o %t/b.o -o %t/a
9 # RUN: llvm-readelf -p .strtab %t/a | FileCheck %s --check-prefix=NODEDUP
10 # RUN: ld.lld -r -O2 %t/a.o %t/b.o -o %t/a.ro
11 # RUN: llvm-readelf -p .strtab %t/a.ro | FileCheck %s --check-prefix=NODEDUP
14 # NODEDUP-NEXT: [ 7] local
15 # NODEDUP-NEXT: [ d] foo
18 # RUN: llvm-readelf -s %t/a.ro | FileCheck %s --check-prefix=SYMTAB
20 # SYMTAB: 0: {{0+}} 0 NOTYPE LOCAL DEFAULT UND
21 # SYMTAB-NEXT: NOTYPE LOCAL DEFAULT [[#]] local
22 # SYMTAB-NEXT: SECTION LOCAL DEFAULT [[#]] .text
23 # SYMTAB-NEXT: NOTYPE LOCAL DEFAULT [[#]] local
24 # SYMTAB-NEXT: NOTYPE GLOBAL DEFAULT [[#]] foo