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
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
13 ; CHECK: Name: __wrap_bar
16 ; CHECK-NEXT: Binding: Global
17 ; CHECK-NEXT: Type: Function
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.
23 ; RESOLS: ,__wrap_bar,plx
24 ; RESOLS: ,__real_bar,plr
26 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
27 target triple = "x86_64-unknown-linux-gnu"
31 define void @_start() {
36 define void @__wrap_bar() {
40 define void @__real_bar() {