Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp4163048ioo; Wed, 25 May 2022 17:02:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUOA/y8WY9mvyySJuEZ4GbWJwYu3s3baW95X+48e16JjOMrylqO0hh9E2o1AxFACwJ+hvB X-Received: by 2002:a17:907:c0d:b0:6fe:b448:61e3 with SMTP id ga13-20020a1709070c0d00b006feb44861e3mr23920875ejc.673.1653523372859; Wed, 25 May 2022 17:02:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653523372; cv=none; d=google.com; s=arc-20160816; b=V5dmdoFHsi6oL10YEVKd4bAceHC7mAuWKL0ZynIgXC53paUlKzPW/F0coF9DWbY1zf 3YVGnmGMyeaeZ3Qp0ONE0J/OkwctwLPJDkJ1/idKQd2PqN56V42ocHhIDCMH4Tss1XFT uwFnFFwDH05tT5C9LJbV2AU5nprz81SdRUiWpSqIv7bjoFQBaXS4Jc9x9GYEVEjlUt0V Z45p1HTCbVGEJDXMRSFS9oMlws1JxeGVpLLUendbbpFihba4vsgQnLOrSf7c1Ls09N6i toocYjN/1X3HQC8K8EZkySThXeRADJnXHOpWq0sg+T35NnJ8lGrmL/3l2hwIDPL0AC/u 3LFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=lTJZIHAmmzBh3yXH0ymAinhMEsW46ZZwUhlNZ0+mjHY=; b=Rw1tDisTQ59fzb/FeSJwp+0w9IP4vdfuiy7ox13c5K/CaZXFcXEA15XmAkK+0HbkQ1 VGtA/lvgS6DQ7TH7XX6F/pfPNRBe7x0b7Kj6DNUsFl6rm0/AVPgglzndKS7JwvmnjPit cw9qNEF0Cl9EM4VGr7zzHh7pdjRl/7jJp5Cm29KAp+okMoyXTP8sqr13ewTbws541ven uxxlQFLaSk4u5coWWpBg41wQXhsiCHDsfRphBIUCdS95YqpuGAYjNyl8j+HVZlyVjSM7 yyUd5lDRTE86yWK4W813EIaq1RY8dhEFCnAkNl8ApdGPQXSyZj7N0XaXN5UI9w/8PJlG K4hA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r20-20020aa7da14000000b0042bb5512bc7si56547eds.180.2022.05.25.17.02.26; Wed, 25 May 2022 17:02:52 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245283AbiEYQ6k (ORCPT + 99 others); Wed, 25 May 2022 12:58:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235187AbiEYQ6f (ORCPT ); Wed, 25 May 2022 12:58:35 -0400 Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 04B2F9CC98 for ; Wed, 25 May 2022 09:58:34 -0700 (PDT) Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 24PGpCBP019535; Wed, 25 May 2022 11:51:12 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 24PGpBfh019533; Wed, 25 May 2022 11:51:11 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 25 May 2022 11:51:11 -0500 From: Segher Boessenkool To: Sathvika Vasireddy Cc: Christophe Leroy , "aik@ozlabs.ru" , jpoimboe@redhat.com, linux-kernel@vger.kernel.org, "rostedt@goodmis.org" , "peterz@infradead.org" , Paul Mackerras , Sathvika Vasireddy , "Naveen N. Rao" , mbenes@suse.cz, linuxppc-dev@lists.ozlabs.org Subject: Re: [RFC PATCH v2 0/7] objtool: Enable and implement --mcount option on powerpc Message-ID: <20220525165111.GP25951@gate.crashing.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,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, May 25, 2022 at 03:44:04PM +0530, Sathvika Vasireddy wrote: > On 24/05/22 18:47, Christophe Leroy wrote: > >This draft series adds PPC32 support to Sathvika's series. > >Verified on pmac32 on QEMU. > > > >It should in principle also work for PPC64 BE but for the time being > >something goes wrong. In the beginning I had a segfaut hence the first > >patch. But I still get no mcount section in the files. > Since PPC64 BE uses older elfv1 ABI, it prepends a dot to symbols. > And so, the relocation records in case of PPC64BE point to "._mcount", > rather than just "_mcount". We should be looking for "._mcount" to be > able to generate mcount_loc section in the files. The dotted symbol is on the actual function. The "normal" symbol is on the "official procedure descriptor" (opd), which is what you get if you (in C) take the address of a function. A procedure descriptor holds one or two more pointers, the GOT and environment pointers. We don't use the environment one, but the GOT pointer is necessary everywhere :-) Segher