20 lines · plain
1# REQUIRES: x862## Test we don't assign VER_NDX_LOCAL to an undefined symbol.3## If we do, an undefined weak will become non-preemptible,4## and we will report an error when an R_PLT_PC (optimized to R_PC)5## references the undefined weak (considered absolute).6 7# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o8# RUN: rm -f %t.a9# RUN: llvm-ar rc %t.a %t.o10# RUN: ld.lld -shared --whole-archive --exclude-libs=ALL %t.a -o %t.so11# RUN: llvm-readelf --dyn-syms %t.so | FileCheck %s12 13# CHECK: 1: {{.*}} WEAK DEFAULT UND bar14# CHECK-NOT: 2:15 16.globl foo17.weak bar18foo:19 call bar20