41 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o3# RUN: echo '{ global: foo; };' > %tg.ver4# RUN: echo '{ local: foo; };' > %tl.ver5# RUN: echo '{ global: foo; local: *; };' > %tgl.ver6# RUN: echo 'V1 { global: foo; };' > %t1.ver7# RUN: echo 'V2 { global: foo; };' > %t2.ver8# RUN: echo 'V2 { global: notexist; local: f*; };' > %t2w.ver9 10## Note, ld.bfd errors on these cases.11# RUN: ld.lld -shared %t.o --version-script %tl.ver --version-script %t1.ver \12# RUN: -o %t.so 2>&1 | FileCheck --check-prefix=LOCAL %s13# RUN: llvm-readelf --dyn-syms %t.so | FileCheck --check-prefix=LOCAL-SYM %s14# RUN: ld.lld -shared %t.o --version-script %tg.ver --version-script %t1.ver \15# RUN: -o %t.so 2>&1 | FileCheck --check-prefix=GLOBAL %s16# RUN: llvm-readelf --dyn-syms %t.so | FileCheck --check-prefix=GLOBAL-SYM %s17# RUN: ld.lld -shared %t.o --version-script %tgl.ver --version-script %t1.ver \18# RUN: -o %t.so 2>&1 | FileCheck --check-prefix=GLOBAL %s19# RUN: llvm-readelf --dyn-syms %t.so | FileCheck --check-prefix=GLOBAL-SYM %s20 21## Note, ld.bfd silently accepts this case.22# RUN: ld.lld -shared %t.o --version-script %t1.ver --version-script %t2.ver \23# RUN: -o %t.so 2>&1 | FileCheck --check-prefix=V1-WARN %s24# RUN: llvm-readelf --dyn-syms %t.so | FileCheck --check-prefix=V1-SYM %s25 26# RUN: ld.lld -shared %t.o --version-script %t1.ver --version-script %t2w.ver \27# RUN: -o %t.so --fatal-warnings --undefined-version28# RUN: llvm-readelf --dyn-syms %t.so | FileCheck --check-prefix=V1-SYM %s29 30# LOCAL: warning: attempt to reassign symbol 'foo' of VER_NDX_LOCAL to version 'V1'31# LOCAL-SYM-NOT: foo32 33# GLOBAL: warning: attempt to reassign symbol 'foo' of VER_NDX_GLOBAL to version 'V1'34# GLOBAL-SYM: foo{{$}}35 36# V1-WARN: warning: attempt to reassign symbol 'foo' of version 'V1' to version 'V2'37# V1-SYM: foo@@V138 39.globl foo40foo:41