1# REQUIRES: x86 2# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o 3# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/wrap-dynamic-undef.s -o %t2.o 4# RUN: ld.lld %t2.o -o %t2.so -shared 5# RUN: ld.lld %t1.o %t2.so -o %t --wrap foo 6# RUN: llvm-readelf --dyn-syms %t | FileCheck %s 7 8# Test that the dynamic relocation uses foo. We used to produce a 9# relocation with __real_foo. 10 11# CHECK: Symbol table '.dynsym' contains 2 entries: 12# CHECK: NOTYPE LOCAL DEFAULT UND 13# CHECK-NEXT: NOTYPE GLOBAL DEFAULT UND foo 14 15.global _start 16_start: 17 callq __real_foo@plt 18