3 ## Version scripts are handled before relocation processing, so
4 ## { local: *; } does not make a canonical PLT VER_NDX_LOCAL.
6 # RUN: echo '.global foo; .type foo, @function; foo:' | \
7 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %t.so.o
8 # RUN: ld.lld %t.so.o -o %t.so -shared
10 # RUN: echo "{ global: main; local: *; };" > %t.script
12 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
13 # RUN: ld.lld %t.o %t.so -o %t -version-script %t.script
14 # RUN: llvm-readelf -r --symbols %t | FileCheck %s
16 # CHECK: Relocation section '.rela.plt' at offset {{.*}} contains 1 entries:
17 # CHECK: R_X86_64_JUMP_SLOT [[ADDR:[0-9a-f]+]] foo + 0
19 # CHECK: Symbol table '.dynsym' contains 2 entries:
20 # CHECK-NEXT: Num: Value Size Type Bind Vis Ndx Name
21 # CHECK-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
22 # CHECK-NEXT: 1: [[ADDR]] 0 FUNC GLOBAL DEFAULT UND foo