brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · ecfea8d Raw
60 lines · plain
1# REQUIRES: x862 3# RUN: split-file %s %t4# RUN: llvm-as %t/lazy.ll -o %tlazybitcode.o5# RUN: llvm-mc -filetype=obj -triple=x86_64-elf %t/dummy.s -o %tdummy.o6# RUN: llvm-mc -filetype=obj -triple=x86_64-elf %t/lazy.s -o %tlazy.o7# RUN: llvm-mc -filetype=obj -triple=x86_64-elf %t/ref.s -o %tref.o8# RUN: llvm-mc -filetype=obj -triple=x86_64-elf %t/weakref.s -o %tweakref.o9# RUN: ld.lld -shared -o %t1.so %tdummy.o --start-lib %tlazy.o --wrap lazy10# RUN: llvm-readelf -s %t1.so | FileCheck --check-prefix=NO-LAZY %s11# RUN: ld.lld -shared -o %t2.so %tdummy.o --start-lib %tlazybitcode.o --wrap lazy12# RUN: llvm-readelf -s %t2.so | FileCheck --check-prefix=NO-LAZY %s13# RUN: ld.lld -shared -o %t3.so %tdummy.o --start-lib %tlazy.o -u lazy --wrap lazy14# RUN: llvm-readelf -s %t3.so | FileCheck --check-prefix=LAZY-DEF %s15# RUN: ld.lld -shared -o %t4.so %tdummy.o %tlazy.o --wrap lazy16# RUN: llvm-readelf -s %t4.so | FileCheck --check-prefix=LAZY-DEF %s17# RUN: ld.lld -shared -o %t5.so %tref.o --start-lib %tlazy.o --wrap lazy18# RUN: llvm-readelf -s %t5.so | FileCheck --check-prefix=LAZY-DEF %s19# RUN: ld.lld -shared -o %t6.so %tweakref.o --start-lib %tlazy.o --wrap lazy20# RUN: llvm-readelf -s %t6.so | FileCheck --check-prefix=LAZY-REF %s21# RUN: ld.lld -shared -o %t7.so %tweakref.o --start-lib %tlazybitcode.o --wrap lazy22# RUN: llvm-readelf -s %t7.so | FileCheck --check-prefix=LAZY-REF %s23# RUN: ld.lld -shared -o %tweakref.so %tweakref.o -soname libweakref.so24# RUN: ld.lld -shared -o %t8.so %tdummy.o %tweakref.so --start-lib %tlazy.o --wrap lazy25# RUN: llvm-readelf -s %t8.so | FileCheck --check-prefix=NO-LAZY %s26 27# NO-LAZY-NOT: lazy28# NO-LAZY-NOT: __wrap_lazy29 30# LAZY-DEF-DAG: [[#]] lazy31# LAZY-DEF-DAG: UND __wrap_lazy32 33# LAZY-REF-NOT: UND lazy34# LAZY-REF-DAG: UND __wrap_lazy35# LAZY-REF-NOT: UND lazy36 37#--- dummy.s38.globl dummy39dummy:40	retq41 42#--- lazy.ll43target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"44target triple = "x86_64-elf"45define void @lazy() {46  ret void47}48 49#--- lazy.s50.globl lazy51lazy:52	retq53 54#--- ref.s55	jmp	lazy56 57#--- weakref.s58.weak lazy59	jmp	lazy60