From nobody Tue Dec 16 12:42:43 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7F265290BC2; Fri, 9 May 2025 20:18:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746821886; cv=none; b=ToOBkqNUDtfuIKqzJnpRigmQwUULoG4C9QQk0pJ/rfEjNZE1r/87y9YN3Q8h5wwx8m78m5zdqw/QtgfKV0bORoi3g4SKUHAJUNWQtTt/0VmmPHuQgUD9to/vaR7iZmCKP54jiYbVCs39vYJias1p+ZD6cKTeMpIFAZJEHRz/Pp8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746821886; c=relaxed/simple; bh=TCh7mN1dtaUkmUbKcMUgKaRQzRkSpr6K6e506gWbFxc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=R1bpPl067Nt/uhHRb7rt6cGwNp7aqBBmU/kIwJClcVyN3SxYWSDgUNepR9s91h/rzwnkmot2PI5IzoTW735+cQ7U+IV0Ngc9igtZfpTdeabz5NyrBkcoItZ70Df21WE7okgXE8Q3BND8I2mgUJEfDCZatMjqlJmlreL2u9/g+Wc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dVomlVuq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dVomlVuq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 749A4C4CEEE; Fri, 9 May 2025 20:18:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1746821886; bh=TCh7mN1dtaUkmUbKcMUgKaRQzRkSpr6K6e506gWbFxc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dVomlVuqWJQIWdDDc3MebpfihTCirAtSplPO1VKcVQZ9HelUbAD/dWpRcj8bVwWlJ CGPvPg7ol7/13NYE0VrYxQMVT6s1TfUqli2qBPVkc2pUDX45Y4IMOFrXuZk5icVafh ZJkTfKCROla4+mY0tbJdfzIV9K/F4UWJwDtvM8fGQb5BqkvxrxqOPdFfTzU1+9I8Tu wycRo7cK0Q7Xzy1HCqbn4Ka3Xa3cJdYVPASHBRQI+YaAScOrGS1OT2gKjvkBvBNLC9 UXZlSWNrhNRVpxoBSNWesBFWtf46TdLuIG80F7NbzEsiowpatNKLcqkkcS615dwZH2 qr/J1bzZ2LRwA== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Petr Mladek , Miroslav Benes , Joe Lawrence , live-patching@vger.kernel.org, Song Liu , laokz , Jiri Kosina , Marcos Paulo de Souza , Weinan Liu , Fazla Mehrab , Chen Zhongjin , Puranjay Mohan Subject: [PATCH v2 30/62] objtool: Simplify reloc offset calculation in unwind_read_hints() Date: Fri, 9 May 2025 13:16:54 -0700 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Simplify the relocation offset calculation in unwind_read_hints(), similar to other conversions which have already been done. Signed-off-by: Josh Poimboeuf --- tools/objtool/check.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 6b2e57d9aaf8..c9f041168bce 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -2221,14 +2221,7 @@ static int read_unwind_hints(struct objtool_file *fi= le) return -1; } =20 - if (is_sec_sym(reloc->sym)) { - offset =3D reloc_addend(reloc); - } else if (reloc->sym->local_label) { - offset =3D reloc->sym->offset; - } else { - ERROR("unexpected relocation symbol type in %s", sec->rsec->name); - return -1; - } + offset =3D reloc->sym->offset + reloc_addend(reloc); =20 insn =3D find_insn(file, reloc->sym->sec, offset); if (!insn) { --=20 2.49.0