[llvm-branch-commits] [lld] [ELF] Avoid moving CFI jump table out of its section if other entries target it (PR #222234)

Vitaly Buka via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Sep 10 00:02:58 PDT 2026


https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/222234

>From 43d39624ef0f00febc2a270f9b27ce6e469b1be6 Mon Sep 17 00:00:00 2001
From: Vitaly Buka <vitalybuka at google.com>
Date: Tue, 8 Sep 2026 22:51:03 -0700
Subject: [PATCH] dropback

Created using spr 1.3.7
---
 lld/ELF/Arch/X86_64.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lld/ELF/Arch/X86_64.cpp b/lld/ELF/Arch/X86_64.cpp
index c49c5e0d54530..39e8b3a104c13 100644
--- a/lld/ELF/Arch/X86_64.cpp
+++ b/lld/ELF/Arch/X86_64.cpp
@@ -379,7 +379,7 @@ void X86_64::relaxCFIJumpTables() const {
         if (!last)
           return nullptr;
 
-        for (Relocation &r : rels) {
+        for (Relocation &r : rels.drop_back()) {
           InputSection *target = getMovableSection(r);
           if (!target || target->getParent() != last->getParent())
             return nullptr;



More information about the llvm-branch-commits mailing list