From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBB64C54FCB for ; Fri, 24 Apr 2020 22:22:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C020D20736 for ; Fri, 24 Apr 2020 22:22:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726116AbgDXWWT (ORCPT ); Fri, 24 Apr 2020 18:22:19 -0400 Received: from ex13-edg-ou-001.vmware.com ([208.91.0.189]:32761 "EHLO EX13-EDG-OU-001.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725874AbgDXWWS (ORCPT ); Fri, 24 Apr 2020 18:22:18 -0400 Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-001.vmware.com (10.113.208.155) with Microsoft SMTP Server id 15.0.1156.6; Fri, 24 Apr 2020 15:22:10 -0700 Received: from localhost (unknown [10.129.220.242]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 2124C4049C; Fri, 24 Apr 2020 15:22:15 -0700 (PDT) Date: Fri, 24 Apr 2020 15:22:14 -0700 From: Matt Helsley To: Sami Tolvanen CC: "Steven Rostedt (VMware)" , Greg Kroah-Hartman , Thomas Gleixner , "Naveen N. Rao" , Kees Cook , , Subject: Re: [PATCH v2] recordmcount: support >64k sections Message-ID: <20200424222214.GC9040@rlwimi.vmware.com> Mail-Followup-To: Matt Helsley , Sami Tolvanen , "Steven Rostedt (VMware)" , Greg Kroah-Hartman , Thomas Gleixner , "Naveen N. Rao" , Kees Cook , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200422232417.72162-1-samitolvanen@google.com> <20200424193046.160744-1-samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200424193046.160744-1-samitolvanen@google.com> Received-SPF: None (EX13-EDG-OU-001.vmware.com: mhelsley@vmware.com does not designate permitted sender hosts) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 24, 2020 at 12:30:46PM -0700, Sami Tolvanen wrote: > When compiling a kernel with Clang and LTO, we need to run > recordmcount on vmlinux.o with a large number of sections, which > currently fails as the program doesn't understand extended > section indexes. This change adds support for processing binaries > with >64k sections. > > Signed-off-by: Sami Tolvanen Feel free to add Reviewed-by: Matt Helsley > --- > Changes in v2: > - Switched to unsigned int for (old|new)_shnum in append_func. > - Added set_shnum and find_symtab helper functions and moved > the new logic there. > > --- > scripts/recordmcount.h | 98 +++++++++++++++++++++++++++++++++++++++--- > 1 file changed, 92 insertions(+), 6 deletions(-) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ex13-edg-ou-001.vmware.com ([208.91.0.189]:32761 "EHLO EX13-EDG-OU-001.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725874AbgDXWWS (ORCPT ); Fri, 24 Apr 2020 18:22:18 -0400 Date: Fri, 24 Apr 2020 15:22:14 -0700 From: Matt Helsley Subject: Re: [PATCH v2] recordmcount: support >64k sections Message-ID: <20200424222214.GC9040@rlwimi.vmware.com> References: <20200422232417.72162-1-samitolvanen@google.com> <20200424193046.160744-1-samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200424193046.160744-1-samitolvanen@google.com> Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: Sami Tolvanen Cc: "Steven Rostedt (VMware)" , Greg Kroah-Hartman , Thomas Gleixner , "Naveen N. Rao" , Kees Cook , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org On Fri, Apr 24, 2020 at 12:30:46PM -0700, Sami Tolvanen wrote: > When compiling a kernel with Clang and LTO, we need to run > recordmcount on vmlinux.o with a large number of sections, which > currently fails as the program doesn't understand extended > section indexes. This change adds support for processing binaries > with >64k sections. > > Signed-off-by: Sami Tolvanen Feel free to add Reviewed-by: Matt Helsley > --- > Changes in v2: > - Switched to unsigned int for (old|new)_shnum in append_func. > - Added set_shnum and find_symtab helper functions and moved > the new logic there. > > --- > scripts/recordmcount.h | 98 +++++++++++++++++++++++++++++++++++++++--- > 1 file changed, 92 insertions(+), 6 deletions(-)