41 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o3# RUN: printf '.globl foo\nfoo: ret' | \4# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux - -o %t2.o5 6# RUN: ld.lld -shared -o %t.so %t1.o --start-lib %t2.o7# RUN: llvm-readobj --dyn-syms %t.so | FileCheck %s8 9# RUN: ld.lld -pie -o %t %t1.o --start-lib %t2.o10# RUN: llvm-readelf --dyn-syms %t | FileCheck %s --check-prefix=STATICPIE11 12# CHECK: Name: foo13# CHECK-NEXT: Value: 0x014# CHECK-NEXT: Size: 015# CHECK-NEXT: Binding: Weak16# CHECK-NEXT: Type: None17# CHECK-NEXT: Other: 018# CHECK-NEXT: Section: Undefined19 20# RUN: ld.lld -pie -o %t %t1.o --start-lib %t2.o --no-dynamic-linker21# RUN: llvm-readelf --dyn-syms %t | FileCheck %s --check-prefix=STATICPIE22 23# STATICPIE: Symbol table '.dynsym' contains 124 25## -u specifies a STB_DEFAULT undefined symbol, so the definition from %t2.o is26## fetched.27# RUN: ld.lld -u foo %t1.o --start-lib %t2.o -o %t128# RUN: llvm-readobj --syms %t1 | FileCheck %s --check-prefix=CHECK-U29 30# CHECK-U: Name: foo31# CHECK-U: Binding:32# CHECK-U-SAME: Global33# CHECK-U: Section:34# CHECK-U-SAME: .text35 36.weak foo37call foo@PLT38 39.data40.quad foo41