1; LTO 2; RUN: llvm-as %s -o %t.o 3; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext %t.o -o %t.out -wrap=bar -plugin-opt=save-temps 4; RUN: llvm-readobj --symbols %t.out | FileCheck %s 5; RUN: cat %t.out.resolution.txt | FileCheck -check-prefix=RESOLS %s 6 7; ThinLTO 8; RUN: opt -module-summary %s -o %t.o 9; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext %t.o -o %t.out -wrap=bar -plugin-opt=save-temps 10; RUN: llvm-readobj --symbols %t.out | FileCheck %s 11; RUN: cat %t.out.resolution.txt | FileCheck -check-prefix=RESOLS %s 12 13; CHECK: Name: __wrap_bar 14; CHECK-NEXT: Value: 15; CHECK-NEXT: Size: 16; CHECK-NEXT: Binding: Global 17; CHECK-NEXT: Type: Function 18 19; Make sure that the 'r' (linker redefined) bit is set for bar and __real_bar 20; in the resolutions file, and that the 'x' (visible to regular obj) bit is set 21; for bar and __wrap_bar. 22; RESOLS: ,bar,lxr 23; RESOLS: ,__wrap_bar,plx 24; RESOLS: ,__real_bar,plr 25 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 void 34} 35 36define void @__wrap_bar() { 37 ret void 38} 39 40define void @__real_bar() { 41 ret void 42} 43