Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp1889276imi; Sat, 23 Jul 2022 23:01:53 -0700 (PDT) X-Google-Smtp-Source: AGRyM1td6k7QCrSsPK+pIJK8dLtM7e/RI1lvQsI4+laIKyc8FrSJsg0keg2dXK+62oPqJAGWjQ6h X-Received: by 2002:a17:90b:1a84:b0:1ef:dc5c:3088 with SMTP id ng4-20020a17090b1a8400b001efdc5c3088mr25700823pjb.245.1658642513739; Sat, 23 Jul 2022 23:01:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658642513; cv=none; d=google.com; s=arc-20160816; b=xJzDJcHPzJEk6mv7ba3IGZBD9ibMAcLPreE8utCO4SpMLCQ4HnmyLMKOsi4X5C9G4f BIwSGDV2otqADoKpVR69wgrB3RXuNl2xrsjegtAWsVWyaDXZVlQJ/ToRcr1BFvHRj3EX yM/YnFOxfiVkWMG1Qva6orMdlweJlRn9cyh6CZwI5mBwxCBPMH/iskrqvJPH3XqInM5E s9QSsFdMViLVXXj9XTijWnmFSPMRp/0s7DeMJKEPUQjJMJ3HpwUyAbl7BlksYjQVN2O0 yQ5py6Upm/QKqZQCFayRDn3xF8dXUdty5OgLFXNYkVah1IsU82cFuCj1CCToRxAlOsdO LUeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=wMKdwBG848qBHhNARCtBeFqUtsE99EGKMgpSlGcHe0g=; b=0DkWAOA+FM3iCCErV+PoNzMLZ5l7ErhSoGyQGaKorFzcMVIXVYhiTbuKT+XbbRoaGL rUIs258LD7AbcyEzgxiv46mZtH3c53cRkj17vGcsu7JkgYUns3G8rf0UquHgAWygBIjC KMjPl2w2mgzHOfrlxJ8AIwPJE6oQcfVWDpzrtRUXzgZlLQP6WKURJR7dgDS0AxCHsVSB Yq1Ldq3TRGoQmewJX4ciKsCQim2HuYjhIz7EViZce87haHZI7HPShZCcbCJLx8nGbHd+ yP+LEs2cs3IcDrTZNuFfi4EH68Tm8c8Z5KM43yVd/2PFOKbpMc398GKr8xxt4XhNWHOo dU9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Gz5KEwpu; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q23-20020a170902edd700b0016d2dd7a6casi10111867plk.182.2022.07.23.23.01.38; Sat, 23 Jul 2022 23:01:53 -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=@linaro.org header.s=google header.b=Gz5KEwpu; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231784AbiGXGAW (ORCPT + 99 others); Sun, 24 Jul 2022 02:00:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbiGXGAU (ORCPT ); Sun, 24 Jul 2022 02:00:20 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CC4510FF0 for ; Sat, 23 Jul 2022 23:00:19 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id o12so7730039pfp.5 for ; Sat, 23 Jul 2022 23:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wMKdwBG848qBHhNARCtBeFqUtsE99EGKMgpSlGcHe0g=; b=Gz5KEwpuisNA2ho8J2DzD8NshjTqDEC5OI20qOEFygh8H6ta4drpmRwmeiaty9faVC B+HEnpHtekw8KjrQ2+KNFiYlklC10NNiyYhcThERGjySadyzsM/l0qt+0MC7vfeDjuAW YdameMlwDgf8dfcag3ihuxaKJMb3k7uQ0TW55dqdKZgaP3/UuNWYFwiqBvx0BdHogMi4 Waj1zxhKUblfXgGwt14RmUV5qp3N1RrPfT8fr45wSDgAg4rJTx0jAbPlVe+yY1IPIAlp /BWEKLIQqk4BRN4RqvzXUV3VryCRlF9x6sLmgTr/c8WWcVqdLWGhIggl82C4YJOK470N Znhg== 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:mime-version :content-transfer-encoding; bh=wMKdwBG848qBHhNARCtBeFqUtsE99EGKMgpSlGcHe0g=; b=h981KRt7+cOwp1jMlYnO/SxNYFPJYTDvQJ94r3xBo84Xo3TwsJ6chw8Ey6qIGFBzDz XSMrCjxEG+7oHhj1G4Cpux7UyXed0SxD04kvIhuwe7WEXgZI0XWMoN5ng9MSX1oRo/1w jMR40iX+dlQiL1CH+3eUE7fyzp5HIXQYGv1E394YnwtHZ01NSSHT+BYBAI40/XeBzp2W u3i9OB8knYlQF2z7+d2KpkgY6S7bPu4PgLxM0NbtZMhkBkpHWG52oxHtJOuUg2KxHCia 3I5Y74YJDYTdkdoFU7POiNwfWZpo7vwA1aoNsp1H66ca/nvWJTWRCY1q81VBhUPkH0YI D8ww== X-Gm-Message-State: AJIora8oFAJ03U4vSsLaGyXIw6d3YQnLWIFXWNpeXlVqrN+zl4GHSfz8 kv+Z9LROAd3G4iVDew2k0XS9+Q== X-Received: by 2002:a63:3181:0:b0:417:b4b5:df09 with SMTP id x123-20020a633181000000b00417b4b5df09mr6438567pgx.398.1658642418418; Sat, 23 Jul 2022 23:00:18 -0700 (PDT) Received: from localhost (n058152077182.netvigator.com. [58.152.77.182]) by smtp.gmail.com with ESMTPSA id d10-20020a170902654a00b0016a7b9558f7sm6543219pln.136.2022.07.23.23.00.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Jul 2022 23:00:18 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Jiri Olsa , Namhyung Kim , Alexander Shishkin , Ian Rogers , Fangrui Song , Chang Rui , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v3 0/2] perf symbol: Minor fixing Date: Sun, 24 Jul 2022 14:00:11 +0800 Message-Id: <20220724060013.171050-1-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 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 tools/perf/util/symbol-elf.c | 56 +++++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 4 deletions(-) -- 2.25.1