From nobody Sat Feb 7 13:05:28 2026 Received: from mail-pg1-f202.google.com (mail-pg1-f202.google.com [209.85.215.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B4882FE582 for ; Thu, 18 Dec 2025 17:58:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766080711; cv=none; b=pARzkweUCZQR+U3fLlqEDzSfeJX487pXfkvt67sXugCoycWRriKZ9CVs/LnspDM1SxvlJLugK9pdpgKZFAp/IdqkdYcur+Evp2M3TQmTeAqq4mXUY0zaV8DjG7FsAbXGeFCwvmBZZLzqydj2jaP5m4yxjMRILtGB5VyDmUVuWic= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766080711; c=relaxed/simple; bh=Z4KNmSbzCRQ9FO16Hx9lP73OGb9Qh7EQcw3jrjxUPJU=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=X1jwrMlLsu1bA7YCbX/QUXdo0OYPzrb8iPPQonT+GAIw9wncZEMSqLwIYR2PBEnulD7So6W1XiEJ8Qsu2VdINP3MFOU9pSTivyJyKTJ4KnmXbThEyvGLtdwuyOcgYoyf25TpNtZUrLf3jYD2ABDwxvPHTXHH1WvJw5LVk2L0hqE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--cmllamas.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=aLb9NT3n; arc=none smtp.client-ip=209.85.215.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--cmllamas.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="aLb9NT3n" Received: by mail-pg1-f202.google.com with SMTP id 41be03b00d2f7-bddf9ce4935so886225a12.1 for ; Thu, 18 Dec 2025 09:58:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1766080709; x=1766685509; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=dhOE0qDuO3LHBfcaO+AbZihIszuhVYqbQJCtl05LcL8=; b=aLb9NT3nplX8eewkGPCJxYxGpd2CjC6/63SmPQHMSgF3lC0Xp28cIZ9g52+37b8iS2 uc+XpnYzaljJBBcyNEAqX5nH2qIX98dsm5YtILkvFqbpFi2eoC0QBNGidxk/3DOnCeou /p68Vy+oNaBTxme19e0OVN6PAHtTZS1HiPIX8JUGTKWmNmA3iKfR6dX/8yc3UALjs+5V 8QPYUmnW1sv6sMMiiYcHKIDOJNNpqYCYTLUgpFfwpxzhHx7AT7WkiYNi1ikK1FLK3T9b evRy1svver8AegYRxtXi4ThvJQOjLLiqUbz7no71PrB//ibD92tqaBB1l0Yl7ybf2laG ujjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766080709; x=1766685509; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=dhOE0qDuO3LHBfcaO+AbZihIszuhVYqbQJCtl05LcL8=; b=STkRSZgbGKGnXVZZvaIMHsuoMmWqvD6xUhXGZdu4JWBNq4uPBl01IwE9yRi1kwc+cd h6NaThmKFu+GhseumVfj8Vpl5dTe/17YmQMhkOSHO5K5Fd88Xl0+wqKu2nHODSRRuJMt 1WIKO7YorEOBHjAU5OVPZ0PhuhZPohRC2aQN4y1i0K3Xsx8tNsnU2eYr1w9HBiItl5ud IvP0mdNrcI87lpIM3st7cOu7ctslM6BYSPsjF9FuVeO4sp8+dX3K+qvOqUDraMWJopuy DbcZa3JHHcFv4YVW5wbrsQu9Bs/QGBU9s4PWEct9f+CinNHr1crsPxu6gnDJ+pcQuHhh a9VA== X-Forwarded-Encrypted: i=1; AJvYcCVRVjbjMPuwEJI/IIESqeJeo001eL60ulrKTdbgg05E9mFbiEmUa6UPqYPukC8Bf/YpIpdogLAGccbcj/0=@vger.kernel.org X-Gm-Message-State: AOJu0Yy4Gmsn0/1twMTwwd6cIXOkbmo9u88ReGdP8X48u7kEVFrHciky 7DE9GAT2dQ3mWHLCicHNy0o6cV+OF8SuS830J1YjDew5glKXWPbL4QrwpM4QxjhKqMzvbvoKSbd /Ixe+Gp72tf+uDw== X-Google-Smtp-Source: AGHT+IErkw9tNWlT8KhSs/OKoLzI83M92d2V9nNa+7cdO5vCZtx0OnC4z314RMstHiBKRzLsamW2JVeM79NOtA== X-Received: from dlbbs11.prod.google.com ([2002:a05:7022:90b:b0:11d:cfca:1df5]) (user=cmllamas job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7023:d03:b0:11b:9e5e:1a40 with SMTP id a92af1059eb24-121722ab330mr138760c88.15.1766080709402; Thu, 18 Dec 2025 09:58:29 -0800 (PST) Date: Thu, 18 Dec 2025 17:58:06 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.52.0.351.gbe84eed79e-goog Message-ID: <20251218175824.3122690-1-cmllamas@google.com> Subject: [PATCH] kbuild: prefer ${NM} in check-function-names.sh From: Carlos Llamas To: Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Josh Poimboeuf , Carlos Llamas , "Peter Zijlstra (Intel)" , Greg Kroah-Hartman Cc: kernel-team@android.com, linux-kernel@vger.kernel.org, "open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b" Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The check-function-names.sh scripts invokes 'nm' directly and this can be problematic during cross-compilation when the toolchain is different from the system's default (e.g. LLVM=3D1). scripts/check-function-names.sh: nm: not found Let's prefer the ${NM} variable which is already set by kbuild. However, still fallback to plain 'nm' to ensure the script is still usable when called directly. Fixes: 93863f3f859a ("kbuild: Check for functions with ambiguous -ffunction= -sections section names") Signed-off-by: Carlos Llamas Reviewed-by: Nathan Chancellor --- scripts/check-function-names.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check-function-names.sh b/scripts/check-function-names= .sh index 410042591cfc..08071133e5a5 100755 --- a/scripts/check-function-names.sh +++ b/scripts/check-function-names.sh @@ -13,7 +13,7 @@ if [ ! -f "$objfile" ]; then exit 1 fi =20 -bad_symbols=3D$(nm "$objfile" | awk '$2 ~ /^[TtWw]$/ {print $3}' | grep -E= '^(startup|exit|split|unlikely|hot|unknown)(\.|$)') +bad_symbols=3D$(${NM:-nm} "$objfile" | awk '$2 ~ /^[TtWw]$/ {print $3}' | = grep -E '^(startup|exit|split|unlikely|hot|unknown)(\.|$)') =20 if [ -n "$bad_symbols" ]; then echo "$bad_symbols" | while read -r sym; do --=20 2.52.0.351.gbe84eed79e-goog