2 # LINK_ORDER cnamed sections are not kept alive by the __start_* reference.
4 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
5 # RUN: ld.lld --gc-sections -z start-stop-gc -z nostart-stop-gc %t.o -o %t
6 # RUN: llvm-objdump --section-headers -t %t | FileCheck %s
8 ## With -z start-stop-gc (default), non-SHF_LINK_ORDER C identifier name
9 ## sections are not retained by __start_/__stop_ references.
10 # RUN: ld.lld --gc-sections %t.o -o %t
11 # RUN: llvm-readelf -S -s %t | FileCheck %s --check-prefix=GC
12 # RUN: ld.lld --gc-sections -z start-stop-gc %t.o -o %t1
13 # RUN: llvm-readelf -S -s %t1 | FileCheck %s --check-prefix=GC
17 # CHECK: xx {{.*}} DATA
20 # CHECK: SYMBOL TABLE:
21 # CHECK: xx 0000000000000000 .protected __start_xx
22 # CHECK: w *UND* 0000000000000000 __start_yy
24 # GC: Section Headers:
28 # GC: WEAK DEFAULT UND __start_xx
29 # GC: WEAK DEFAULT UND __start_yy
45 .section yy,"ao",@progbits,.foo