Skip to content

Commit ec0c93c

Browse files
committed
Update test
1 parent a9e5abe commit ec0c93c

File tree

2 files changed

+17
-25
lines changed

2 files changed

+17
-25
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
; Test the fix that BOLT should skip speical handling of any non virtual
2+
; function pointer relocations in relative vtable.
3+
4+
; RUN: llc --filetype=obj -mtriple=aarch64-none-linux-gnu \
5+
; RUN: --relocation-model=pic -o %t.o %s
6+
; RUN: %clang %cxxflags -fuse-ld=lld %t.o -o %t.so -Wl,-q
7+
; RUN: llvm-bolt %t.so -o %t.bolted.so
8+
9+
$_fake_rtti_data = comdat any
10+
@_fake_rtti_data = internal unnamed_addr constant [16 x i8] c"_FAKE_RTTI_DATA_", comdat, align 8
11+
12+
@_ZTV3gooE = internal unnamed_addr constant { { [3 x i32] } } { { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint (ptr @_fake_rtti_data to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV3gooE, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @foo to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV3gooE, i32 0, i32 0, i32 2) to i64)) to i32)] } }, align 4
13+
14+
define internal ptr @foo(ptr %this) {
15+
%1 = load ptr, ptr @_ZTV3gooE, align 8
16+
ret ptr %1
17+
}

bolt/test/X86/skip-non-vfuncptr-reloc-in-relative-vtable.cpp

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)