xref: /llvm-project/lld/test/ELF/start-lib-comdat.s (revision 0f298ec6ccc0877117e4ee8036a58d10e5ff1ac3)
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 --dyn-syms %t3 | FileCheck %s
8// RUN: ld.lld -shared -o %t3 --start-lib %t2.o --end-lib %t1.o
9// RUN: llvm-readobj --dyn-syms %t3 | FileCheck %s
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: .sec
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.global zed
25zed:
26