Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp250326ybz; Fri, 24 Apr 2020 15:24:43 -0700 (PDT) X-Google-Smtp-Source: APiQypIFCQyWaBYyj3dQgMWYKZHlApGgRuPlPea8/L22IdjHs6j82PtG79cAIbjh4dwYy8ekGe1a X-Received: by 2002:aa7:c5cf:: with SMTP id h15mr9791445eds.213.1587767082829; Fri, 24 Apr 2020 15:24:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587767082; cv=none; d=google.com; s=arc-20160816; b=iBcgyxLKdzgOO1oUw6yE/B5OGMyovm2qFNYSbojtyqN2S0wE5GavugrszjMfAaTUx2 Jobn1XrXyFaBxfZixcDTjri88JLW8vMJCdBK1YHfKfSOFvuiXLq6e03a0PK1gUjA2lHf e6rBqCzp1SH8vdYdIxlbvggsJ6z+1hywsDN6R7TdXTs20TjLUSMUacrEsTXPKhhoyYVU WPkNC83yPL5xFm9xJQ5FXsfGkqGIcNRW0t6zrZ3rGiNugPqra1j6VL54F5xEfteQEhOe XBPbWzjdYWZcqR7kCHyICwckL46kOaAhCxAsq3KfZBM4OdiSvvmdD9O/euMle0wx8RNO yiSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date; bh=Kxi6l/pRfWxX/E22VsmDygMRspI6HRoQlVx4bBmRJ0w=; b=y8gI/PgZ/d73jFbKrEFsxg2PKH7XGqew8nNUdDAuhR2JgM9NYxRlNdiyXxjyQNP52j dfIzZTjeuayD+ctJ/v6ur852mzqQUFhN1V3M5iN5x25FQNWXXSghMNZqbMn/BVS3xoEA fCNn8Bbldaw0m1V2qSq/QqViN88/eSNGf/t1M6DRLgcLOuKw8ikxiWTl0NrSDJm3nFlK /SoaA3/syesblzqzBFWBc7vqBIDdEt14R+Mj9eSEup0w9A0bPR8BKHiPl46WQDs3ilP5 WGeuwHnv6aIcqYO/XblziUxW6VPCi/K4iQfyBw6bSjV+lGFodGuZRyeFdJrKKpArcndJ n0Dw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v11si3894630edy.483.2020.04.24.15.24.19; Fri, 24 Apr 2020 15:24:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726073AbgDXWWT (ORCPT + 99 others); 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(-)