27 lines · plain
1# REQUIRES: x862 3## Version scripts are handled before relocation processing, so4## { local: *; } does not make a canonical PLT VER_NDX_LOCAL.5 6# RUN: echo '.global foo; .type foo, @function; foo:' | \7# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %t.so.o8# RUN: ld.lld %t.so.o -o %t.so -shared9 10# RUN: echo "{ global: main; local: *; };" > %t.script11 12# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o13# RUN: ld.lld %t.o %t.so -o %t -version-script %t.script --undefined-version14# RUN: llvm-readelf -r --symbols %t | FileCheck %s15 16# CHECK: Relocation section '.rela.plt' at offset {{.*}} contains 1 entries:17# CHECK: R_X86_64_JUMP_SLOT [[ADDR:[0-9a-f]+]] foo + 018 19# CHECK: Symbol table '.dynsym' contains 2 entries:20# CHECK-NEXT: Num: Value Size Type Bind Vis Ndx Name21# CHECK-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND22# CHECK-NEXT: 1: [[ADDR]] 0 FUNC GLOBAL DEFAULT UND foo23 24.globl _start25_start:26 movl $foo - ., %eax27