1# REQUIRES: x86 2 3## An weak undefined symbol does not fetch the lazy definition. 4## Version scripts do not affect undefined symbols. 5 6# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o 7# RUN: echo '.globl foo; foo:' | llvm-mc -filetype=obj -triple=x86_64 - -o %t1.o 8# RUN: echo "{ local: *; };" > %t.script 9# RUN: ld.lld -shared --version-script %t.script %t.o --start-lib %t1.o --end-lib -o %t.so 10# RUN: llvm-readobj --dyn-syms -r %t.so | FileCheck %s 11 12# CHECK: Relocations [ 13# CHECK-NEXT: Section ({{.*}}) .rela.plt { 14# CHECK-NEXT: R_X86_64_JUMP_SLOT foo 15# CHECK-NEXT: } 16# CHECK-NEXT: ] 17# CHECK: Symbol { 18# CHECK: Name: foo 19# CHECK-NEXT: Value: 0x0 20# CHECK-NEXT: Size: 0 21# CHECK-NEXT: Binding: Weak 22# CHECK-NEXT: Type: None 23# CHECK-NEXT: Other: 0 24# CHECK-NEXT: Section: Undefined 25# CHECK-NEXT: } 26 27.text 28 callq foo@PLT 29.weak foo 30