From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-178.mta0.migadu.com (out-178.mta0.migadu.com [91.218.175.178]) (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 59E6E3DA5D6 for ; Thu, 4 Jun 2026 06:55:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780556112; cv=none; b=mrxJxsJ3JRa7t44ZUxbBWuid7ZHS8pzeSrWggxFlQ68KnNM918mPEUJmwH8IKL/QMguWcR8+Nj59wftLk3ZLwQmhPoKxPMMZfSf23r9zMq8hZ7AoYzGsKwCvKraD+xdozzUPjIvSroAOsjSKg29X1jEoMKHgRoArTpMZvxK3RWk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780556112; c=relaxed/simple; bh=oLaUr+FB9VSsAuBRiSWaPzIJPJ7H5RqIcSuL90V25FQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YhXlSp9TZPPxrSGonpO6KpGOizvZPbL5XwZcvLV8miorK/K6BpYotNOPnytPKePLKGggioe/n4uc/FdXLEXHM8UuncUo0HzYLtpVB7yf8Bi7hVKdu+fka2zISROKRBI/PMN4j2CDJpYW409aId+d7IzHuTJivXaM0OfnEve6CLA= 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=tdnOfxvD; arc=none smtp.client-ip=91.218.175.178 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="tdnOfxvD" 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=1780556106; 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=tdnOfxvDgxTn6fQkXk2LW/QfycMkY+owjw4QTRPOcWLfnrvl3pox0zq+UNndIX99OR/tj8 Acw4eyINDBioJiju8gexjls2B0K2kgKKuZYEuhMT4AlkdB/+Gpa38tJPi2gA7syUN0WVnw BbAgK2RyqU8WkrIP7+DmoYoBj/Pk+Zs= 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, xry111@xry111.site, liukexin@kylinos.cn, loongarch@lists.linux.dev, live-patching@vger.kernel.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, George Guo Subject: [PATCH 2/8] objtool/LoongArch: Add arch_adjusted_addend() for KLP support Date: Thu, 4 Jun 2026 14:53:11 +0800 Message-Id: <20260604065317.219777-3-dongtai.guo@linux.dev> In-Reply-To: <20260604065317.219777-1-dongtai.guo@linux.dev> References: <20260604065317.219777-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