Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp1883087imi; Sat, 23 Jul 2022 22:41:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sXJCwQNtd8PGZB9+Lsfx+vkhdeyX36IiiPykCC3VFP4LWMTheoWtVG7RnByZN9k0LhAn2T X-Received: by 2002:a17:907:2848:b0:72b:5ba5:1db5 with SMTP id el8-20020a170907284800b0072b5ba51db5mr5601623ejc.703.1658641309946; Sat, 23 Jul 2022 22:41:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658641309; cv=none; d=google.com; s=arc-20160816; b=TUl5rp/JaIkoifbWUMNoqaNGfTaabpsA9FyEKwa6LRyM8qb1CQHPvUGzUvBCY5xkxa S+Hg8vU6JKRcwYufto96chm+KKRK9iDdBLfIvkVaMRZbx5Svb8XK5PPSNx4YXVn9eHzP gLAzzNeanavQEnLiDIVnKOeEBQwpMBWmmCSbxz6fWun4ciOf1sSu1zTfNpbEq72R6Trg 48gN+PX7fSu359pqDyBWhEsi/5w0t3ttGyqof5WFJUAPTdoyBlMSf39nXAHpWCi4vWHM 1cJoqr2Bl9+ISIj2h67sn+/R6mvTBR7kbQ0LD5c3p8iECs3pPz0BK+vm6cOUI/y+qALW sThw== 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=DVcGMUg63ZuyRPGB+ax8hjQYbRon/AMmT/KHY/uYZvM=; b=Pk7KoYsVSGFXiC77o72lz/BH32iykD64z/ByfCnu61k1XP8nPDIOVPeURVeGNIWFPd q+mwlCItCaE5mj126ZUe4fM9OxJ5j1uxhizdoVsJ3JgnyoZ/VjryebV1zVYwNdJtFHF3 zGi315X6mpJFkY+zmccv5xy56sqoWasaH0R+4wkpYiTS4TtIQyxXruAJPZjQFMiuoyAW Q8UyCtGiH4qX9G9S2oak+o9GPhwpKO+DH5AmHQTBMMfiRyWt+rA+lSm5tJf5/iDdGtaU DL5/0oYS+WkNLU2ZbxbkQBBLdgqIFwLbiswqsbVbgnCbAnHYiidvqveiePBVLnnkH/UM +2kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N44XlBTh; 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 hp36-20020a1709073e2400b0072af7d4a334si11823341ejc.646.2022.07.23.22.41.25; Sat, 23 Jul 2022 22:41:49 -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=N44XlBTh; 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 S235283AbiGXFXi (ORCPT + 99 others); Sun, 24 Jul 2022 01:23:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233273AbiGXFXg (ORCPT ); Sun, 24 Jul 2022 01:23:36 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F50518E28 for ; Sat, 23 Jul 2022 22:23:35 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id y15so7712230plp.10 for ; Sat, 23 Jul 2022 22:23:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=DVcGMUg63ZuyRPGB+ax8hjQYbRon/AMmT/KHY/uYZvM=; b=N44XlBThF9hr0YdMwSqE/Y8pqxRR0qN7YJASl4rflgM929JO2OHiZZC3Tt9eG//5Mr bksL1BeskWKeL5+tl9ML0hAeD7Let4DHvVZSj7JFppsP/flZNhp6Da/GQWkoLVAXSh8s 82e7TBIoe4GdJG6yXOEIHcpmNUlm7f/fn9WNB3cKy4tk+dM61JaL7pv9BDmkhR3Hg+4d t7kXbus2/xDk2L+LnvvVhOq8HahOafa68USNdYtJbENOlK4n63nPvYYam3OSv1utrz74 p/zGFwbWqP/wO/YM7ylhCE6XkzL3+7D5gDaAhDM83sP/Q4tSMfEOZittVPXU3zMjOyfg wRTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=DVcGMUg63ZuyRPGB+ax8hjQYbRon/AMmT/KHY/uYZvM=; b=k3wXXlC8SaOHnlnjkMGwN8qCeVp2LLaCGqNrOxWdQZ6ncuIxIkC+RHCZ315jX9EBvH s5EFJ4+BEb1cGe5sGDntVianjt39fWnVwjXv/y2KJmoieelsB3gys9rQk081arNP69AY qroa/tfKj+mbcc7o2GCSlr6sSi6YKTMlJTcrTPAx4xmOHD4IzvoXRdUEUewUq33ur7++ wJP3AMmJy1eoOC4+8LiDyeZXVTkzX2iBelPXZVVyYnxLHdmSnFt5jnWhDM5sCN9n77SU a13bHtgW32f/9LWqbQCDdvvJh4hhn499CXKAaLUHVdw3lGQwTnx95rKSzqxQVaVqhNnq yrlw== X-Gm-Message-State: AJIora8WvkXFbomeAn6jEqc2VI/RkFP7jPzrinRTWRa8XzMIbXRYekfN b//CGxoLS+IGa6Q+4HKmPNkB5w== X-Received: by 2002:a17:90a:17e1:b0:1f2:2ff2:6cae with SMTP id q88-20020a17090a17e100b001f22ff26caemr17913677pja.196.1658640214217; Sat, 23 Jul 2022 22:23:34 -0700 (PDT) Received: from leoy-ThinkPad-X240s (ec2-18-144-7-244.us-west-1.compute.amazonaws.com. [18.144.7.244]) by smtp.gmail.com with ESMTPSA id p64-20020a622943000000b0052b9351737fsm7036475pfp.92.2022.07.23.22.23.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Jul 2022 22:23:33 -0700 (PDT) Date: Sun, 24 Jul 2022 13:23:27 +0800 From: Leo Yan To: Fangrui Song Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Jiri Olsa , Namhyung Kim , Alexander Shishkin , Ian Rogers , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] perf symbol: Skip recording symbols in '.gnu.warning.*' sections Message-ID: <20220724052327.GB82137@leoy-ThinkPad-X240s> References: <20220724022857.2621520-1-leo.yan@linaro.org> <20220724022857.2621520-3-leo.yan@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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=unavailable 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 Sat, Jul 23, 2022 at 08:42:20PM -0700, Fangrui Song wrote: > On Sat, Jul 23, 2022 at 7:29 PM Leo Yan wrote: > > > > Some symbols are observed their 'st_value' field are zeros. E.g. > > libc.so.6 in Ubuntu contains a symbol '__evoke_link_warning_getwd' which > > resides in the '.gnu.warning.getwd' section, unlike normal symbols, this > > kind of symbols are only used for linker warning. > > > > This patch skips to record symbols from '.gnu.warning.*' sections by > > detecting the sub string '.gnu.warning' is contained in section name. > > > > Signed-off-by: Leo Yan > > Presumably __evoke_link_warning_getwd is due to `clang -fuse-ld=lld > -static ...` on a file calling the deprecated getwd. > GNU ld and gold implement a .gnu.warning.* feature which removes the > section. ld.lld just ignores this section as the usefulness of the > functionality is unclear. > > The section .gnu.warning.getwd does not have the SHF_ALLOC flag. Such > sections are not part of memory images and I think it is more generic > ignoring all symbols residing in a non-SHF_ALLOC section. Good point! Will refine the patch for this and send out soon. Thanks a lot, Fangrui.