1# REQUIRES: x86 2 3# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o 4# RUN: ld.lld %t.o -shared -soname=t.so -o %t.so 5# RUN: echo '{ foo; };' > %t.list 6# RUN: ld.lld %t.o %t.so -shared --dynamic-list %t.list -o %t 7# RUN: llvm-readelf --dyn-syms %t | FileCheck --check-prefix=SYM %s 8# RUN: llvm-readobj -r %t | FileCheck --check-prefix=REL %s 9 10## foo and bar interpose symbols in another DSO, so both are exported, 11## even if --dynamic-list specifies only foo. 12 13# SYM-DAG: bar 14# SYM-DAG: foo 15 16## bar is not specified in --dynamic-list, so it is not preemptable when 17## producing a DSO, and its PLT does not have an associated JUMP_SLOT. 18 19# REL: .rela.plt { 20# REL-NEXT: R_X86_64_JUMP_SLOT foo 0x0 21# REL-NEXT: } 22 23.globl foo, bar 24foo: 25bar: 26 ret 27 28call foo@PLT 29call bar@PLT 30