brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · f8b35a0 Raw
43 lines · plain
1; LTO2; RUN: llvm-as %s -o %t.o3; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext %t.o -o %t.out -wrap=bar -plugin-opt=save-temps4; RUN: llvm-readobj --symbols %t.out | FileCheck %s5; RUN: cat %t.out.resolution.txt | FileCheck -check-prefix=RESOLS %s6 7; ThinLTO8; RUN: opt -module-summary %s -o %t.o9; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext %t.o -o %t.out -wrap=bar -plugin-opt=save-temps10; RUN: llvm-readobj --symbols %t.out | FileCheck %s11; RUN: cat %t.out.resolution.txt | FileCheck -check-prefix=RESOLS %s12 13; CHECK:      Name: __wrap_bar14; CHECK-NEXT: Value:15; CHECK-NEXT: Size:16; CHECK-NEXT: Binding: Global17; CHECK-NEXT: Type: Function18 19; Make sure that the 'r' (linker redefined) bit is set for bar and __real_bar20; in the resolutions file, and that the 'x' (visible to regular obj) bit is set21; for bar and __wrap_bar.22; RESOLS: ,bar,lxr23; RESOLS: ,__wrap_bar,plx24; RESOLS: ,__real_bar,plr25 26target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"27target triple = "x86_64-unknown-linux-gnu"28 29declare void @bar()30 31define void @_start() {32  call void @bar()33  ret void34}35 36define void @__wrap_bar() {37  ret void38}39 40define void @__real_bar() {41  ret void42}43