brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 5355df2 Raw
44 lines · plain
1; REQUIRES: x862; LTO3; RUN: llvm-as %s -o %t.o4; RUN: ld.lld %t.o -o %t.out -wrap=bar -save-temps5; RUN: llvm-readobj --symbols %t.out | FileCheck %s6; RUN: cat %t.out.resolution.txt | FileCheck -check-prefix=RESOLS %s7 8; ThinLTO9; RUN: opt -module-summary %s -o %t.o10; RUN: ld.lld %t.o -o %t.out -wrap=bar -save-temps11; RUN: llvm-readobj --symbols %t.out | FileCheck %s12; RUN: cat %t.out.resolution.txt | FileCheck -check-prefix=RESOLS %s13 14; CHECK:      Name: __wrap_bar15; CHECK-NEXT: Value:16; CHECK-NEXT: Size:17; CHECK-NEXT: Binding: Global18; CHECK-NEXT: Type: Function19 20; Make sure that the 'r' (linker redefined) bit is set for bar and __real_bar21; in the resolutions file. The calls to bar and __real_bar will be routed to22; __wrap_bar and bar, respectively. So they cannot be inlined.23; RESOLS: ,bar,xr{{$}}24; RESOLS: ,__wrap_bar,plx{{$}}25; RESOLS: ,__real_bar,plr{{$}}26 27target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"28target triple = "x86_64-unknown-linux-gnu"29 30declare void @bar()31 32define void @_start() {33  call void @bar()34  ret void35}36 37define void @__wrap_bar() {38  ret void39}40 41define void @__real_bar() {42  ret void43}44