25 lines · plain
1# REQUIRES: x862 3# RUN: echo '.globl a; .type a, @function; .type a, @function; a: ret' | \4# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %ta.o5# RUN: ld.lld %ta.o --shared --soname=a.so -o %ta.so6 7# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o8# RUN: ld.lld %t.o --as-needed %ta.so -o %t9# RUN: llvm-readelf -d %t | FileCheck %s10# RUN: ld.lld %t.o --as-needed %ta.so --gc-sections -o %t11# RUN: llvm-readelf -d %t | FileCheck %s12 13# The order of %ta.so and %t.o does not matter.14 15# RUN: ld.lld --as-needed %ta.so %t.o -o %t16# RUN: llvm-readelf -d %t | FileCheck %s17# RUN: ld.lld --as-needed %ta.so %t.o --gc-sections -o %t18# RUN: llvm-readelf -d %t | FileCheck %s19 20# CHECK: a.so21 22.global _start23_start:24 jmp a@PLT25