From mboxrd@z Thu Jan 1 00:00:00 1970 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 4A6DA3612E2; Fri, 1 May 2026 04:09:07 +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=1777608547; cv=none; b=HXgSJsqpvRPOh1lt74/nL850YxyAlusmR+doBdLG3zamwmMvYO/GUEcN0FID+5AjApPxxs2zvx65kZFB1e3bxibaP/DQ6v9gXrMb+a9dZzSnqliQwJorHMxu7Sc1GPljeJBDJzk5mCsNG26ZH4BSNP3mIULxe3cBunIakQ7zOk0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777608547; c=relaxed/simple; bh=A20AvTEi6L7BTg1dmFVmmAv0wnARcCkDo3eAoHGEx18=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BAjtPUjx/Aw3vhtBngDIOPLRCd1tqVamb7WsO7HzmH7j7A3Sf+5vABkV0mksGkQy5aiMNE3uqDkt5G9BMg0ro4RqGaDaf+hTyFjqPEwUubxGsEvFz9KVCQ1OVnBfZzxbjrmGli4iQugsFTR3Xg0faO2zvZa0fUqAr6VpWy79f3c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QB5oC6EX; 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="QB5oC6EX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA183C2BCB7; Fri, 1 May 2026 04:09:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777608547; bh=A20AvTEi6L7BTg1dmFVmmAv0wnARcCkDo3eAoHGEx18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QB5oC6EXQuZuIm1Lm526qA7zPBS/EdBCRZasdGQirjZkD187LtH4hegD3QrY4Uuzx WzCcAx2hkcR4WD4BalX17dCnMQSllG2/1xu/SSo1aOF2ovxPP9uWykEKz6hiebv1ut RIu9XTRi0tybY9uggfR0AN+ZyzMuHEvSmiVAJmJCAfKX1j35/8v/qhyn7cn83ORRbr vRHSWqRY3uk/RbCYFaegcmGTQHKwcl4X+DSdrOe0RH9zU70Ytp8+9unQXduyTnTKsA l7F4a3w9TE/n6Bi18MNCGzjO2qH8iIcNZKvkVN+uyyBGr7ch7KQW7RMkVkZ1rNm4vw Pu1kE8716wpKw== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Peter Zijlstra , Joe Lawrence , Song Liu , Miroslav Benes , Petr Mladek Subject: [PATCH v2 36/53] objtool/klp: Handle Clang .data..Lanon anonymous data sections Date: Thu, 30 Apr 2026 21:08:24 -0700 Message-ID: X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: live-patching@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Clang generates anonymous data sections named .data..Lanon.. These need section-symbol references in the same way as .data..Lubsan (GCC) and .data..L__unnamed_ (Clang UBSAN) sections. Without this, convert_reloc_sym() fails when processing relocations that reference these sections. Acked-by: Song Liu Signed-off-by: Josh Poimboeuf --- tools/objtool/klp-diff.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/objtool/klp-diff.c b/tools/objtool/klp-diff.c index 463b6daa5234..7e58ef36f805 100644 --- a/tools/objtool/klp-diff.c +++ b/tools/objtool/klp-diff.c @@ -1030,14 +1030,15 @@ static int convert_reloc_secsym_to_sym(struct elf *elf, struct reloc *reloc) } /* - * Sections with anonymous or uncorrelated data (strings, UBSAN data) - * need section symbol references. + * Sections with anonymous or uncorrelated data (strings, UBSAN data, Clang + * anonymous constants) need section symbol references. */ static bool is_uncorrelated_section(struct section *sec) { return is_string_sec(sec) || strstarts(sec->name, ".data..Lubsan") || /* GCC */ - strstarts(sec->name, ".data..L__unnamed_"); /* Clang */ + strstarts(sec->name, ".data..L__unnamed_") || /* Clang */ + strstarts(sec->name, ".data..Lanon."); /* Clang */ } /* -- 2.53.0