Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp86611imn; Mon, 25 Jul 2022 10:43:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ude5SFPOZNYsG+LJKSZMwl1lp+sZL99DTrteiW4lMdn+ETGkz9+YYKZYiSzP7s5CiyClMc X-Received: by 2002:a17:902:778a:b0:16c:a1c9:7b14 with SMTP id o10-20020a170902778a00b0016ca1c97b14mr13291900pll.116.1658770994085; Mon, 25 Jul 2022 10:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658770994; cv=none; d=google.com; s=arc-20160816; b=dt1iyWs5getQbCehYtBnVdoBn22hvj6h7TtexvK96kqxccXlJhPio0vKEMzb/5qPSL NJyDPLpgzjfrk9Yv6DVYtamagZcKDoJb7BEn4182sEYrudJ9vRi04rvAS4VLuQjOfAmG ExsjXu9V8Yj84BcBI6QD8e4+MoX+QFIPJQ9z/TcSHyfvcjSRo++Hxaa7hztMk/uthiLl qcJOy6XX73vJaehGHfDRLfidfbpHSN2/P+Mz+sz++2vHaJpDq5DYl2aQfb2uCbuP8cd5 4nfhX8Z0E4gWAOGsuQG54t62k8oQ5KCYsoSFV0QEdOVASE1vzExm6+pAQZDBXO7r8UYL eQdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=jixhLRXWZLkPKYEPDWgQPh6SGq09TVIqqu6cu1z6t7k=; b=wXykJCgbn5D+ZDnZUb4FhzY77v0SnJIRLsHBuwAXo2ikuJ4nl/qoiGZSkE2uOAyLK7 Kpi3aRTXn0eURQuZCtaoEK6KValsKERF18kmc94lK+p9J/Y39as5Y4IW2fby7aHEwou6 rQ4dONqmEpuMYlc66Tzy/TeaECdDyO/1dnw5lI/meCqXULYZjZgbOhUaU/Xn20lKoBCj 5/+jZ0sf/dEyjsCKJbEE/QrjTh+3FY5YL8AYjB4kcx62A+mXKIWE/DJvtxEeptzkDO+Y NtlFmbChMfYkMwwp3qUFR5EWtJSlwTMTIEzATkHsErdLsSoQay6Kjjju2UC8LRRTGtdk xsjA== ARC-Authentication-Results: i=1; mx.google.com; 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 k186-20020a636fc3000000b0041a3b20bce0si15264307pgc.708.2022.07.25.10.42.58; Mon, 25 Jul 2022 10:43:14 -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; 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 S236078AbiGYQyf (ORCPT + 99 others); Mon, 25 Jul 2022 12:54:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233730AbiGYQyd (ORCPT ); Mon, 25 Jul 2022 12:54:33 -0400 Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0289F1D311; Mon, 25 Jul 2022 09:54:33 -0700 (PDT) Received: by mail-oi1-f181.google.com with SMTP id u76so14181178oie.3; Mon, 25 Jul 2022 09:54:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jixhLRXWZLkPKYEPDWgQPh6SGq09TVIqqu6cu1z6t7k=; b=YuHTg+pfPwb6ajwrekCUuNPITe9RjMHUh0ViLjsgf4uTKn/O+PnJ5Lp5LHHmKmlRG9 axgRFXviZ7XhXSO9oaCUeX/Jn7njkcvkFb5N0no1968VgUpAAZBv0wcPCuMWEjh7fdQx Mn0dbDR7mZsZqBEcKmiBAZ4lX6Ll0w1OoCeVk2ovoJM0rrE05VX2ue/8A0u37nRy2l+7 6J0ENX3lzCDfzXO9qybK8ZivP7oDQjzmOpoO2H4EqKkfjMwboUACS6YsF/v1Vo0nwQiY t1na3aNUyWdrHmWY216bayRZsCywWhAcYfBRqXqaX6grZ2SogNA6mMpvmb2Hs2Uv/u3+ ZLDw== X-Gm-Message-State: AJIora8oH7P9QbgcjxU9WWEqNbcsdiJ0w2SyRIXRvQ8BOJAz9J/KS7OI TnYQ1CCZLzzzWyREpxNkTMSNHhZM+oZl2YnEtAo= X-Received: by 2002:a05:6808:1492:b0:33a:7448:8b98 with SMTP id e18-20020a056808149200b0033a74488b98mr6228395oiw.92.1658768072284; Mon, 25 Jul 2022 09:54:32 -0700 (PDT) MIME-Version: 1.0 References: <20220724060013.171050-1-leo.yan@linaro.org> In-Reply-To: <20220724060013.171050-1-leo.yan@linaro.org> From: Namhyung Kim Date: Mon, 25 Jul 2022 09:54:21 -0700 Message-ID: Subject: Re: [PATCH v3 0/2] perf symbol: Minor fixing To: Leo Yan Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Jiri Olsa , Alexander Shishkin , Ian Rogers , Fangrui Song , Chang Rui , linux-perf-users , linux-kernel Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no 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 Hi Leo, On Sat, Jul 23, 2022 at 11:00 PM Leo Yan wrote: > > This patch set contains two minor fixing for parsing symbols. > > The first patch changes to use program header for parsing symbols of > user space executable and shared objects. Since kernel's symbol parsing > is more complex than userspace for support both kernel symbols and module > symbols, this is why this patch set uses conservative way and doesn't > change kernel symbols parsing. > > The second patch is to detect symbols from sections without setting > attribute flag SHF_ALLOC, these symbols are used for linker warning, > skip to record them to avoid spurious symbols. > > Changes from v2: > - Changed to use more gernal way to check the attribute bit SHF_ALLOC > for sections rather than check the section string name (Fangrui). > > Changes from v1: > - Changed to use program header / PT_LOAD segments to parse symbols for > userspace executable and shared object files (Fangrui). > > > Leo Yan (2): > perf symbol: Correct address for bss symbols > perf symbol: Skip symbols if SHF_ALLOC flag is not set Acked-by: Namhyung Kim Thanks, Namhyung > > tools/perf/util/symbol-elf.c | 56 +++++++++++++++++++++++++++++++++--- > 1 file changed, 52 insertions(+), 4 deletions(-) > > -- > 2.25.1 >