Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1941580iob; Thu, 5 May 2022 11:23:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5UTDF4EGqLwIiucIpkdK6wt9UdMpHrUrpEDCjKAbSXxucevB5yHiA4JAmLQDPorG7vZWS X-Received: by 2002:a17:903:2446:b0:15e:ab0e:559 with SMTP id l6-20020a170903244600b0015eab0e0559mr20071987pls.83.1651775010447; Thu, 05 May 2022 11:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651775010; cv=none; d=google.com; s=arc-20160816; b=aePJvDJDTCouYnLOfgJp9uRA+dC+aJmJyO5ViPUD0RolkzFQDHhhZpwxfR0taICtPi UMumvFQeRkLrstFukQfmGkxn9x7yn1s8uThx0R5oi4sXVYMBwENXWacI9KpbGUpoFDEW ucX7Nl99f/ZvRgVkccQhuikNmnmsAKCrtenVLPuFozOGy9ffvDXUOjbs0Q/c5OCRA3b1 jfpZ5LvKUgYHTIQUNuij+97O4Py9yxH8JjXv4uGxFXcdwezo9pq2XJAtjH/UDSn7efpJ JLUQWZREfHjrUFPmrJqORH1/bop5rk8xBdGj5HJSE0gakionk/1j13W/hncTVvUqoFUc MG1A== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=2XmEQWrY3NYEdvSG6uf/vlN37THFmGRRjUaGA+j6EeI=; b=SENcTkt6aMS2ir+p9XVvGocZvaCbp1k0X7oEMQ5j1/qUq2G+7lZK/7ARlPNZCrkvqD w+xxXcgPfYcP4hTMBp2iAEBa4E8fDCKv2CNxwhP9r4ciIM/U7Mp2hIAgGEIKFVVdKnT1 J30kTJYKP6gyJ130rYt6wH7tZwz3iuNM+hOcaBdyyBkQHjQsRZ8rLqkfzltIt/9qLgYZ bGe+49lSbW6Gv58x6XOyahCXWvEaiH7jtwLlM4lcjdXNJ+5JTY4yOhE8b8W5vtbAfOUd ztCHQlCbavs9mgN7CS8a9yOHzC01iCrpYGNreY/3LD+Vnbi5622UOR+toXfyNfCEdskO cbpQ== 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 fz21-20020a17090b025500b001d28802aac8si2681309pjb.135.2022.05.05.11.23.11; Thu, 05 May 2022 11:23:30 -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 S1377039AbiEDRzo (ORCPT + 99 others); Wed, 4 May 2022 13:55:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359713AbiEDRkP (ORCPT ); Wed, 4 May 2022 13:40:15 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CF4947558 for ; Wed, 4 May 2022 10:06:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 62488B827B3 for ; Wed, 4 May 2022 17:06:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B65FFC385B4; Wed, 4 May 2022 17:06:48 +0000 (UTC) Date: Wed, 4 May 2022 13:06:42 -0400 From: Steven Rostedt To: Christophe Leroy Cc: "Naveen N. Rao" , "llvm@lists.linux.dev" , Nick Desaulniers , "linux-kernel@vger.kernel.org" , Nathan Chancellor , "linuxppc-dev@lists.ozlabs.org" Subject: Re: [PATCH 2/2] recordmcount: Handle sections with no non-weak symbols Message-ID: <20220504130642.7b9a301d@rorschach.local.home> In-Reply-To: <72d17597-874c-f3a3-9398-0cc944350c5b@csgroup.eu> References: <1b9566f0e7185fb8fd8ef2535add7a081501ccc8.1651047542.git.naveen.n.rao@linux.vnet.ibm.com> <20220427095415.594e5120@gandalf.local.home> <1651129169.fpixr00hgx.naveen@linux.ibm.com> <20220428100602.7b215e52@gandalf.local.home> <819939e3-285b-2a65-9c4c-85640d2a3a02@csgroup.eu> <20220502195251.5d862365@rorschach.local.home> <6d5ff91a-560e-56ea-0047-175f712872c2@csgroup.eu> <20220503122533.6033647e@rorschach.local.home> <72d17597-874c-f3a3-9398-0cc944350c5b@csgroup.eu> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,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, 4 May 2022 16:50:58 +0000 Christophe Leroy wrote: > In vmlinux, relocations are resolved, trampolines are installed for > unreachable destinations and you don't anymore have a section with all > the relocations to mcount. It means 'recordmcount' or whatever tool we > use will have to read the code to find all direct calls to mcount, then > find all trampolines to mcount then find all calls to those trampolines. OK, so what you are saying is that in the object file, we can see the site that calls mcount, but when it is linked, it may not call mcount, but instead it will call a trampoline that will call mcount, thus the tool will need to find these calls to the trampolines that call mcount as well as the locations that call mcount directly. Did I get that right? -- Steve