From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-171.mta1.migadu.com (out-171.mta1.migadu.com [95.215.58.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B1313BB122 for ; Mon, 8 Jun 2026 10:09:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780913369; cv=none; b=Knqcel7LxLGNZyyIH0badgZ6qYkF6MVGSzLOCb9cvKLJHAIhYYTHZiXbwv5v4Vu9WETkAPhHEUNgmE1wyWx6UV6a1zJlhNPIahRrbz0BUHHFUz4yXGQusuezzc9Wqm0Bm/3PcohMZBoYVdxXczYIwyjyAvKcqX0f38P+w8dhFek= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780913369; c=relaxed/simple; bh=oLaUr+FB9VSsAuBRiSWaPzIJPJ7H5RqIcSuL90V25FQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Mx651wgvKAnJuE8uUNG06ipisr0goZtQVx5967HKkqVkcxk85/LUdctF+p26GLxy6ogguNLr4n6EJ/EZIaFA4/Cr00fi0TUaQcOQjFzNVsifRW5cfXbx2G0/Vp9EJLDzGPVH6KqsKeF54mc5LqA2uQ3knm2tBOqm3FR3+4WRU60= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=Odn9mZY3; arc=none smtp.client-ip=95.215.58.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Odn9mZY3" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1780913355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=svJYdefjY/nnU0nlx6aQgjbpTVvVYZOsKKX0wUiaSj0=; b=Odn9mZY3cNUro3pEUg1lhAW8gAMo7ePk90o5AGYh4roShxVWdKlb0a8sBa0dLRAOllemGN S9e2A+sL0BMMhHP2qWhWRhmbtdynGoscDodaBTP6UsRLN78FLhWsboFvwBnR5oDISjBVKt VeVw5ldW6sERyqUVmNz6eIzNCJcnCto= From: George Guo To: chenhuacai@kernel.org, jpoimboe@kernel.org, peterz@infradead.org, jikos@kernel.org, mbenes@suse.cz, pmladek@suse.com Cc: kernel@xen0n.name, joe.lawrence@redhat.com, rostedt@goodmis.org, ardb@kernel.org, nathan@kernel.org, nick.desaulniers+lkml@gmail.com, yangtiezhu@loongson.cn, jiaxun.yang@flygoat.com, liukexin@kylinos.cn, guodongtai@kylinos.cn, xry111@xry111.site, wangyuli@aosc.io, loongarch@lists.linux.dev, live-patching@vger.kernel.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/8] objtool/LoongArch: Add arch_adjusted_addend() for KLP support Date: Mon, 8 Jun 2026 18:08:45 +0800 Message-Id: <20260608100852.325413-2-dongtai.guo@linux.dev> In-Reply-To: <20260608100852.325413-1-dongtai.guo@linux.dev> References: <20260608100852.325413-1-dongtai.guo@linux.dev> Precedence: bulk X-Mailing-List: live-patching@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT From: George Guo Implement arch_adjusted_addend() to return the relocation addend value. Co-developed-by: Kexin Liu Signed-off-by: Kexin Liu Signed-off-by: George Guo --- tools/objtool/arch/loongarch/decode.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/objtool/arch/loongarch/decode.c b/tools/objtool/arch/loongarch/decode.c index 6cd288150f49..674e4efd138f 100644 --- a/tools/objtool/arch/loongarch/decode.c +++ b/tools/objtool/arch/loongarch/decode.c @@ -34,6 +34,11 @@ s64 arch_insn_adjusted_addend(struct instruction *insn, struct reloc *reloc) return reloc_addend(reloc); } +u64 arch_adjusted_addend(struct reloc *reloc) +{ + return reloc_addend(reloc); +} + bool arch_pc_relative_reloc(struct reloc *reloc) { return false; -- 2.25.1