Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp232953rwb; Tue, 25 Jul 2023 15:03:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlE9IAZ3wAyDSUQvQP5T+gt3WvlpfzDu2TWzILU9ZSRAmUp8audeRmf1iHpXWMoy3bHaqvTD X-Received: by 2002:a05:6a20:a8a5:b0:134:4f86:7990 with SMTP id ca37-20020a056a20a8a500b001344f867990mr290371pzb.3.1690322614782; Tue, 25 Jul 2023 15:03:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690322614; cv=none; d=google.com; s=arc-20160816; b=GjyPFnlBmBkpkG4HewuMRMKw+FIAz9rJPi29K75ehwlRF6/+mA7ELXRryfTMsmyK+D m6hKj9SZq2M7vPzexgDYPDdn9iwJJNX12VY30/jBFIQQVoV4kZCmyBpofCnxOinNsoBo aRIWLThyUvPP9wwGpTl9YyXSz3iujj3eKltOuFf9vI0LksviZfcIdwLnbeMtU0dtssFv vol3S27ugsHhsRiV4H0ZuJJrKKDwAXZf3Y/PVfU3Gv6hBpN0NIQtyOFp4reXsrk987M6 79ryln5dssBI7KIElaZjVWlT4xGaH+YGmL0elLUiRFl4BioDktJ1tkydSONpxEWRlKS2 kWvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yIpSY9hKiFy5GJbta7fLiaUlE6H5wYAbq9LK8bNVNfg=; fh=idiqMXLaMQZcpH9/6e4eRIL7FoMVG+SsZ9kcL+9gE9o=; b=Crw4BXtHNPIyQmtceP8H7U/ypFt24Pplh1DjlQfepBUb+cANCacTyu7qWba6uGzk39 BeOZG/csrGG7d3aUIiOQ7Zx1M4JmszMfOSghCDxrTFLbaWRXUqGsmxAFUA6SPdCiFtmc KRcxbfww4GqgmExVEFgRVubvBzlqkajWyVvAXmY6Gek6dMVrZQviw0tceLRZSBuwY8bI KARVFnsZI4R7DD4VL/2WxdF/Rtrz/5ok+ijI4Ghhj7vv6Db+lgsr69Suv8T5Xs4Rg/El W2aUxsRjKOlh5IjpOi+RDpo1ZYmeHOdLZQlCkz5IhZ0vMB1SGCMtqIk+JmjlkFdn85b9 Exxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SBzM7oer; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a8-20020a63d208000000b0056371f9322asi11955206pgg.478.2023.07.25.15.03.22; Tue, 25 Jul 2023 15:03:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SBzM7oer; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230233AbjGYViL (ORCPT + 99 others); Tue, 25 Jul 2023 17:38:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229664AbjGYViK (ORCPT ); Tue, 25 Jul 2023 17:38:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EA251FCF; Tue, 25 Jul 2023 14:38:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E94606186A; Tue, 25 Jul 2023 21:38:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F2CFC433C7; Tue, 25 Jul 2023 21:38:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690321088; bh=iQnUOYEDM9zbdSaZI5cBSuRGjGkw1hFUZD3jQXC38sI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SBzM7oer0Pi+VHosBQgnmCuPvCgtkPbWja2/R+y7xn62/LlA/msmhfYSD+N4+OyP6 pLWfX+zMKhhwfRLHVzl89QjvzeQNbx1Y6in6ALH4epBp/CcP2j0/p3hbV96bL9okf8 /opJOMb391x2aairp78OOjEg2h5UoPIIeCKbxHQKey1FWcoSfeCNHM/LZtpzr3w6Lf 4ZNH2w4wnR5KZaECabTSp7KfBhF67ne9tgx5p1TDG5cWcBcYzrFPdWn7wcH0dRa5qE mIEisYZPEvEpJ+O8HPsvjlI2Q2L+CekAnyGyrRXyTcnoqmbaUrjNrsGp44bNgRbLS+ StlCS/6giwZjA== Date: Tue, 25 Jul 2023 14:38:05 -0700 From: Josh Poimboeuf To: Will Deacon Cc: linux-kernel@vger.kernel.org, kernel-team@android.com, Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , John Stultz , linux-kbuild@vger.kernel.org Subject: Re: [PATCH v2 2/2] scripts/faddr2line: Constrain readelf output to symbols from System.map Message-ID: <20230725213805.g6osfswz5o6cxusy@treble> References: <20230725211157.17031-1-will@kernel.org> <20230725211157.17031-3-will@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230725211157.17031-3-will@kernel.org> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 25, 2023 at 10:11:57PM +0100, Will Deacon wrote: > @@ -185,7 +186,7 @@ __faddr2line() { > found=2 > break > fi > - done < <(${READELF} --symbols --wide $objfile | sed 's/\[.*\]//' | ${AWK} -v sec=$sym_sec '$7 == sec' | sort --key=2) > + done < <(${READELF} --symbols --wide $objfile | sed -f ${IGNORED_SYMS} -e 's/\[.*\]//' | ${AWK} -v sec=$sym_sec '$7 == sec' | sort --key=2) > > if [[ $found = 0 ]]; then > warn "can't find symbol: sym_name: $sym_name sym_sec: $sym_sec sym_addr: $sym_addr sym_elf_size: $sym_elf_size" Looks good, though the outer loop has another readelf incantation: done < <(${READELF} --symbols --wide $objfile | sed 's/\[.*\]//' | ${AWK} -v fn=$sym_name '$4 == "FUNC" && $8 == fn') It should probably have the same sed options? Also it looks like it's wrongly checking for FUNC. -- Josh