2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
3 # RUN: echo -e '.globl foo\nfoo: ret' | \
4 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux - -o %t2.o
6 # RUN: ld.lld -shared -o %t.so %t1.o --start-lib %t2.o
7 # RUN: llvm-readobj --dyn-syms %t.so | FileCheck %s
9 # RUN: ld.lld -pie -o %t %t1.o --start-lib %t2.o
10 # RUN: llvm-readobj --dyn-syms %t | FileCheck %s
13 # CHECK-NEXT: Value: 0x0
15 # CHECK-NEXT: Binding: Weak
16 # CHECK-NEXT: Type: None
17 # CHECK-NEXT: Other: 0
18 # CHECK-NEXT: Section: Undefined
20 ## -u specifies a STB_DEFAULT undefined symbol, so the definition from %t2.o is
22 # RUN: ld.lld -u foo %t1.o --start-lib %t2.o -o %t1
23 # RUN: llvm-readobj --syms %t1 | FileCheck %s --check-prefix=CHECK-U
27 # CHECK-U-SAME: Global