[lld] [lld-macho][arm64] Enhance safe ICF with thunk-based deduplication (PR #106573)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 30 17:16:40 PDT 2024
================
@@ -175,6 +179,25 @@ void ARM64::populateThunk(InputSection *thunk, Symbol *funcSym) {
/*offset=*/0, /*addend=*/0,
/*referent=*/funcSym);
}
+// Just a single direct branch to the target function.
+static constexpr uint32_t icfSafeThunkCode[] = {
+ 0x14000000, // 08: b target
----------------
alx32 wrote:
LLD needs generic support for such scenarios - not only relating to this feature, but relating to code generation in general. So this is a general problem - and yes, we don't introduce any special feature to mitigate this for this situation. When generic support will be added for this scenario, we will be inheriting it.
https://github.com/llvm/llvm-project/pull/106573
More information about the llvm-commits
mailing list