Skip to content

Commit 2898b93

Browse files
committed
Mark the aliases function for target-specific relocation.
1 parent 8064e00 commit 2898b93

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/llvm-multiversioning.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,12 @@ void CloneCtx::rewrite_alias(GlobalAlias *alias, Function *F)
711711
uint32_t id;
712712
GlobalVariable *slot;
713713
std::tie(id, slot) = get_reloc_slot(F);
714+
for (auto &grp: groups) {
715+
grp.relocs.insert(id);
716+
for (auto &tgt: grp.clones) {
717+
tgt.relocs.insert(id);
718+
}
719+
}
714720

715721
auto BB = BasicBlock::Create(ctx, "top", trampoline);
716722
IRBuilder<> irbuilder(BB);

0 commit comments

Comments
 (0)