Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7D54DC433EF for ; Tue, 12 Jul 2022 01:07:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C9E6D84103; Tue, 12 Jul 2022 03:05:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="MQ8/K1z4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 228BA840E2; Tue, 12 Jul 2022 03:05:05 +0200 (CEST) Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3F948840BE for ; Tue, 12 Jul 2022 03:04:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-wm1-x332.google.com with SMTP id v67-20020a1cac46000000b003a1888b9d36so5904565wme.0 for ; Mon, 11 Jul 2022 18:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ffq0BIrPzyHilPWRR2d/TXLUcA1umreEDqX/Vd9E0Sc=; b=MQ8/K1z4MOPLteNU04+YeH010toY/mClycA+6Np60m4sb0S/XE0anSgVkcuM2klwzX qabjFeYSL1+0iDDsreu1NNLdBjsTC4fa7SpuvWGj5miA1zkEYh7f7qOvSk0QtqXROoWl N3bzmZV4lKYCpHqqIX6MgivScLLy6ba3DEBw8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ffq0BIrPzyHilPWRR2d/TXLUcA1umreEDqX/Vd9E0Sc=; b=72p8OkC0lU3agywXtqAeod2NFEVDYfJuLvl7s3kvGbitRcswK8yDZe/WovlDIPG8UJ UKkmTykJLH9Zkl8NiOxYDnMbW2QN1Wy/2r6p7fNIYJGFiWcbi/fFtwVSaG6EHvJCA77N /bfclixGOTppCI9VLPuAejbxYzo2BLxdphaQ+Q1O8iCLc6syxOvAwR+PR8GoyC0fj85L VB+RY242CT7LjXgfIN9p+tXH2WB2ylmMnuDfT/FHNr8bkVJlFSOVNtL7YuZu7K8EO+o7 yHQDEc8lgsv0hsTNR9TWDws32aq1T+oPDoHgsNvDasjaS/bVBVST0IE/olKdE9waeTWs vnGQ== X-Gm-Message-State: AJIora9iwaLYf0wbJfTss6qsngEgyQKN6abwiv/u3RCLRrqxmq8Te6xu mAbTSWGA2BmPxOL3BOcXKphYXn+ZCgI1r7H3 X-Google-Smtp-Source: AGRyM1vMPiJgOZdH2g1V2UpvnolDaIaYPf5QdMd4svudqbAhRCF6YoHO7wliqqgvTvRiu2Mz3JtqnA== X-Received: by 2002:a05:600c:22d3:b0:3a2:d8e2:8f15 with SMTP id 19-20020a05600c22d300b003a2d8e28f15mr1002750wmg.177.1657587890301; Mon, 11 Jul 2022 18:04:50 -0700 (PDT) Received: from sjg1.roam.corp.google.com (host-92-0-109-232.as13285.net. [92.0.109.232]) by smtp.gmail.com with ESMTPSA id p12-20020a5d48cc000000b0021d9d13bf6csm5541152wrs.97.2022.07.11.18.04.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 18:04:49 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 17/19] buildman: Allow lines without a symbol Date: Mon, 11 Jul 2022 19:04:11 -0600 Message-Id: <20220712010413.331984-18-sjg@chromium.org> X-Mailer: git-send-email 2.37.0.144.g8ac04bfd2-goog In-Reply-To: <20220712010413.331984-1-sjg@chromium.org> References: <20220712010413.331984-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean The 'nm' tool can produce lines without a symbol, for example: 00000004 t Silently skip these and anything else without three fields. Drop the warning since there is nothing the user can do about it. Signed-off-by: Simon Glass Reported-by: Tom Rini --- tools/buildman/builder.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index 33f9373b8f8..76252b90792 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -669,17 +669,15 @@ class Builder: """ sym = {} for line in fd.readlines(): - try: - if line.strip(): - size, type, name = line[:-1].split() - except: - tprint("Invalid line in file '%s': '%s'" % (fname, line[:-1])) - continue - if type in 'tTdDbB': - # function names begin with '.' on 64-bit powerpc - if '.' in name[1:]: - name = 'static.' + name.split('.')[0] - sym[name] = sym.get(name, 0) + int(size, 16) + line = line.strip() + parts = line.split() + if line and len(parts) == 3: + size, type, name = line.split() + if type in 'tTdDbB': + # function names begin with '.' on 64-bit powerpc + if '.' in name[1:]: + name = 'static.' + name.split('.')[0] + sym[name] = sym.get(name, 0) + int(size, 16) return sym def _ProcessConfig(self, fname): -- 2.37.0.144.g8ac04bfd2-goog