From 2898b93264a4dfed09a30251af00b54f37cb1e1d Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Fri, 18 Sep 2020 09:38:38 +0200 Subject: [PATCH] Mark the aliases function for target-specific relocation. --- src/llvm-multiversioning.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/llvm-multiversioning.cpp b/src/llvm-multiversioning.cpp index 4fd3efe0fdf70..099596358b571 100644 --- a/src/llvm-multiversioning.cpp +++ b/src/llvm-multiversioning.cpp @@ -711,6 +711,12 @@ void CloneCtx::rewrite_alias(GlobalAlias *alias, Function *F) uint32_t id; GlobalVariable *slot; std::tie(id, slot) = get_reloc_slot(F); + for (auto &grp: groups) { + grp.relocs.insert(id); + for (auto &tgt: grp.clones) { + tgt.relocs.insert(id); + } + } auto BB = BasicBlock::Create(ctx, "top", trampoline); IRBuilder<> irbuilder(BB);