1// REQUIRES: x86
2
3// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
4// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux \
5// RUN:   %p/Inputs/start-lib-comdat.s -o %t2.o
6// RUN: ld.lld -shared -o %t3 %t1.o --start-lib %t2.o --end-lib
7// RUN: llvm-readobj --symbols %t3 | FileCheck %s
8// RUN: ld.lld -shared -o %t3 --start-lib %t2.o --end-lib %t1.o
9// RUN: llvm-readobj --symbols %t3 | FileCheck /dev/null --implicit-check-not='Name: zed'
10
11// CHECK:      Name: zed
12// CHECK-NEXT: Value:
13// CHECK-NEXT: Size:
14// CHECK-NEXT: Binding: Global
15// CHECK-NEXT: Type:
16// CHECK-NEXT: Other:
17// CHECK-NEXT: Section: Undefined
18
19        call bar@plt
20// The other file also has a section in the zed comdat, but it defines the
21// symbol zed. That means that we will have a lazy symbol zed, but when adding
22// the actual file zed will be undefined.
23        .section        .sec,"aG",@progbits,zed,comdat
24