Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp282713pxb; Thu, 14 Apr 2022 22:40:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKmv+Wz/7Nk+C35kmfkBB+mKfWSbIqrSatP/l7oGMHTOEpKxuKBetmlHUyqdqU5iAyYLrL X-Received: by 2002:a63:f412:0:b0:381:28f:85dd with SMTP id g18-20020a63f412000000b00381028f85ddmr5102991pgi.319.1650001200471; Thu, 14 Apr 2022 22:40:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650001200; cv=none; d=google.com; s=arc-20160816; b=ciKZbX83LDi1nW+qkYwTPCEgXpZoBkVvtddXq67UOUM7J8CzwH6UT5Ra2RaonetwFL FQvdvzrbAPnjSm2+PV8maHFa1i/U8PNi3Bc0L5mq3/7OhE49EytCt8Oz9+cggP4KZxYH 5WpxUiXcXu98To6umQGb+8Jf4yjIuQakc2X9J5t7/MLsRw9wHoA4T1dVW6PY8gOiBEL3 bT92R9EN3hYEQFEcR6zoNY/04Q7SGlN8bIUbohTlD81EMr+OBBZwmsgHIr4qY6yzMlFW nfrRacz6mxHBRGIp84MXtzUMdsba4P1AkQdCJKG24T2/n5fOqWxw9ETAGHDcfZvRe7y4 jz5g== 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=ae9LbWo+RjgLEmtT+cEXYBgVvEkOVOVVV7WuO2O+Th0=; b=O09SVaSs0zOdFDwiIB9pdVCFJCpbBAoN6DKBQiybtAgd6zI0BIutP7LyNpl504tsAE 0kNw+8Il9pPcCiIbIyiqLoqCoMBfQ0BRdkquADAZ5KQFH+n7PZynA4PkmuMjhnBdQtlS FSIMK6JoeByV/qPkEMGpYIIcgMmePgV/+T/o9NnwjRwRBpX6KpRaiHmqb5AeMAHDzguF CSCBOWSAsH5ZGGoYYLyd/V6SU9bY2JZ/4CPntPHYmNhGLO6+cNQ6UY4RtvbEROdzVo9t TN48Jhg31YbfPnSMJ1IP0JWIWTF5jfyv9aFav0i416px9ePq7cHDljFJXzBA6X95XDmx EOHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=bBSETPTr; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l6-20020a170902f68600b00158d2c6cacesi227258plg.284.2022.04.14.22.39.47; Thu, 14 Apr 2022 22:40:00 -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=@infradead.org header.s=desiato.20200630 header.b=bBSETPTr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240215AbiDNHIY (ORCPT + 99 others); Thu, 14 Apr 2022 03:08:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231582AbiDNHIX (ORCPT ); Thu, 14 Apr 2022 03:08:23 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CDB83A72D for ; Thu, 14 Apr 2022 00:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ae9LbWo+RjgLEmtT+cEXYBgVvEkOVOVVV7WuO2O+Th0=; b=bBSETPTr1w6G0qfAtJ1VsVh8ql yqlAj2eCvjzb1zEv5Pizl8PGW3GqtkuVe/3AhmUW6+lszTAnVF+SEsRNJ7MkkxppiEzFEdWLWTMSl loIdFb4gICdMbBwusUnrgjlFYpPxPW8Kv/p3cBaXaSnecStbB6kIW+QIh290XM9Kj96JD5F9vfxhB mPp2Mc3vnR0mRVv7ClovW9uLCwdRmUH7JMKRI/SBjIIYyC36dzcmUJuQhfIb6JaOk+UUGxpTWdG8t iFdYaLFg8UpplVT17h260paBQh017ozzIzxcQQd5azi2z2wO8MsJFuZI1cdS1wjJwfMbM0RYt6p9b dGrlIMDA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1netY6-004wIn-Bg; Thu, 14 Apr 2022 07:05:50 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 028E63001AE; Thu, 14 Apr 2022 09:05:47 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id B3899313544F1; Thu, 14 Apr 2022 09:05:47 +0200 (CEST) Date: Thu, 14 Apr 2022 09:05:47 +0200 From: Peter Zijlstra To: Josh Poimboeuf Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Miroslav Benes Subject: Re: [PATCH 02/18] objtool: Support data symbol printing Message-ID: References: <097057f88605aa67b0e3ec573fcf394ae7ac4d6f.1649891421.git.jpoimboe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <097057f88605aa67b0e3ec573fcf394ae7ac4d6f.1649891421.git.jpoimboe@redhat.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Wed, Apr 13, 2022 at 04:19:37PM -0700, Josh Poimboeuf wrote: > @@ -34,8 +37,8 @@ static inline char *offstr(struct section *sec, unsigned long offset) > > str = malloc(strlen(name) + 20); > > - if (func) > - sprintf(str, "%s()+0x%lx", name, name_off); > + if (sym) > + sprintf(str, "%s%s+0x%lx", name, is_text ? "()" : "", name_off); > else > sprintf(str, "%s+0x%lx", name, name_off); So I like the patch, except that "()" thing is something where we differ from the kernel's %ps format and I've cursed it a number of times because I then have to manually edit (iow remove) things when pasting it in various scripts etc.. That said, it totally makes sense to differentiate between a text and data symbol this way :/