24 lines · plain
1# REQUIRES: x862 3# RUN: echo '.globl foo; .type foo, @function; foo:' | \4# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %t1.o5# RUN: ld.lld -shared -o %t1.so -soname libfoo %t1.o6 7# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t2.o8# RUN: ld.lld -o %t.exe %t2.o --as-needed %t1.so9# RUN: llvm-readelf -d --dyn-syms %t.exe | FileCheck %s10 11# CHECK-NOT: libfoo12 13# CHECK: Symbol table '.dynsym' contains 2 entries:14# CHECK-NEXT: Num: Value Size Type Bind Vis Ndx Name15# CHECK-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND16# CHECK-NEXT: 1: 0000000000000000 0 FUNC WEAK DEFAULT UND foo17 18.globl _start19.weak foo20 21_start:22 mov $foo, %eax23 callq foo24