[all-commits] [llvm/llvm-project] 2a83c0: [BOLT] Support relative vtable (#135449)
YongKang Zhu via All-commits
all-commits at lists.llvm.org
Mon Apr 14 10:25:09 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2a83c0cc134471bdbc8342041d12fa514e17eca1
https://github.com/llvm/llvm-project/commit/2a83c0cc134471bdbc8342041d12fa514e17eca1
Author: YongKang Zhu <yongzhu at fb.com>
Date: 2025-04-14 (Mon, 14 Apr 2025)
Changed paths:
M bolt/lib/Core/Relocation.cpp
M bolt/lib/Rewrite/RewriteInstance.cpp
A bolt/test/runtime/relative-vftable.cpp
Log Message:
-----------
[BOLT] Support relative vtable (#135449)
To handle relative vftable, which is enabled with clang option
`-fexperimental-relative-c++-abi-vtables`, we look for PC relative
relocations whose fixup locations fall in vtable address ranges.
For such relocations, actual target is just virtual function itself,
and the addend is to record the distance between vtable slot for
target virtual function and the first virtual function slot in vtable,
which is to match generated code that calls virtual function. So
we can skip the logic of handling "function + offset" and directly
save such relocations for future fixup after new layout is known.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list