-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[BOLT][RelVTable] Skip special handling on non virtual function pointer relocations #137406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c2ea84a
[BOLT] Skip special handling on non virtual function pointer relocati…
yozhu a9e5abe
Add a test case
yozhu ec0c93c
Update test
yozhu 8628cda
Update test - replace '.ll' with '.s'
yozhu 4205c35
Update test comment as suggested
yozhu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
bolt/test/AArch64/skip-non-vfuncptr-reloc-in-relative-vtable.s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Test the fix that BOLT should skip speical handling of any non virtual | ||
// function pointer relocations in relative vtable. | ||
|
||
// RUN: llvm-mc -filetype=obj -triple aarch64-unknown-gnu %s -o %t.o | ||
// RUN: %clang %cxxflags -fuse-ld=lld %t.o -o %t.so -Wl,-q | ||
// RUN: llvm-bolt %t.so -o %t.bolted.so | ||
|
||
.text | ||
.p2align 2 | ||
.type foo,@function | ||
foo: | ||
.cfi_startproc | ||
adrp x8, _ZTV3gooE | ||
add x8, x8, :lo12:_ZTV3gooE | ||
ldr x0, [x8] | ||
ret | ||
.Lfunc_end0: | ||
.size foo, .Lfunc_end0-foo | ||
.cfi_endproc | ||
|
||
.type _fake_rtti_data,@object | ||
.section .rodata.cst16._fake_rtti_data,"aMG",@progbits,16,_fake_rtti_data,comdat | ||
.p2align 3, 0x0 | ||
_fake_rtti_data: | ||
.ascii "_FAKE_RTTI_DATA_" | ||
.size _fake_rtti_data, 16 | ||
|
||
.type _ZTV3gooE,@object | ||
.section .rodata,"a",@progbits | ||
.p2align 2, 0x0 | ||
_ZTV3gooE: | ||
.word 0 | ||
.word _fake_rtti_data-_ZTV3gooE-8 | ||
.word foo@PLT-_ZTV3gooE-8 | ||
.size _ZTV3gooE, 12 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.