[lld] [NFC][ELF] Don't reimplement addReloc in GotSection::addConstant (PR #171177)

Jessica Clarke via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 24 02:58:07 PST 2025


https://github.com/jrtc27 updated https://github.com/llvm/llvm-project/pull/171177

>From a2b3b52ca98303b821a3eecc4e90f0b1409a77f8 Mon Sep 17 00:00:00 2001
From: Jessica Clarke <jrtc27 at jrtc27.com>
Date: Mon, 8 Dec 2025 18:30:11 +0000
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?=
 =?UTF-8?q?s=20to=20main=20this=20commit=20is=20based=20on?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Created using spr 1.3.5

[skip ci]
---
 lld/ELF/Relocations.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp
index ef19a2af0c4d2..2f08181a4eb0c 100644
--- a/lld/ELF/Relocations.cpp
+++ b/lld/ELF/Relocations.cpp
@@ -717,7 +717,7 @@ static void addRelativeReloc(Ctx &ctx, InputSectionBase &isec,
     // field. This is described in further detail in:
     // https://github.com/ARM-software/abi-aa/blob/main/memtagabielf64/memtagabielf64.rst#841extended-semantics-of-r_aarch64_relative
     if (addend < 0 || static_cast<uint64_t>(addend) >= sym.getSize())
-      isec.relocations.push_back({expr, type, offsetInSec, addend, &sym});
+      isec.addReloc({expr, type, offsetInSec, addend, &sym});
     return;
   }
 



More information about the llvm-commits mailing list