From: Josh Poimboeuf Date: Fri, 10 Apr 2026 03:50:35 +0000 (-0700) Subject: objtool/klp: Handle Clang .data..Lanon anonymous data sections X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff0cf5efef40e3b60e7bb27a6072f9a0c6e4c5ce;p=thirdparty%2Flinux.git objtool/klp: Handle Clang .data..Lanon anonymous data sections 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 --- diff --git a/tools/objtool/klp-diff.c b/tools/objtool/klp-diff.c index 463b6daa52341..7e58ef36f805b 100644 --- a/tools/objtool/klp-diff.c +++ b/tools/objtool/klp-diff.c @@ -1030,14 +1030,15 @@ found_sym: } /* - * 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 */ } /*