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=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_2 autolearn=unavailable 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 DB31AC433E0 for ; Fri, 12 Feb 2021 17:46:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A390B64E89 for ; Fri, 12 Feb 2021 17:46:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231906AbhBLRql (ORCPT ); Fri, 12 Feb 2021 12:46:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:48760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231474AbhBLRqb (ORCPT ); Fri, 12 Feb 2021 12:46:31 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2D31664E89; Fri, 12 Feb 2021 17:45:49 +0000 (UTC) Date: Fri, 12 Feb 2021 12:45:47 -0500 From: Steven Rostedt To: Josh Poimboeuf Cc: Greg Kroah-Hartman , Nick Desaulniers , Xi Ruoyao , "# 3.4.x" , Arnd Bergmann , "Peter Zijlstra (Intel)" , Miroslav Benes , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , LKML , linux-tip-commits@vger.kernel.org Subject: Re: [tip: objtool/urgent] objtool: Fix seg fault with Clang non-section symbols Message-ID: <20210212124547.1dcf067e@gandalf.local.home> In-Reply-To: <20210212170750.y7xtitigfqzpchqd@treble> References: <160812658044.3364.4188208281079332844.tip-bot2@tip-bot2> <20210212170750.y7xtitigfqzpchqd@treble> 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 12 Feb 2021 11:07:50 -0600 Josh Poimboeuf wrote: > > Any ideas are appreciated. > > [ Adding Steve Rostedt ] > > This error message comes from recordmcount. It probably can't handle > the missing STT_SECTION symbols which are getting stripped by the new > binutils. (Objtool also had trouble with that.) > > No idea why you only see this on 4.4 though. > Just taking a quick look, but would something like this work? I created this against v4.4.257. -- Steve diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h index 04151ede8043..698404f092d0 100644 --- a/scripts/recordmcount.h +++ b/scripts/recordmcount.h @@ -437,6 +437,8 @@ static unsigned find_secsym_ndx(unsigned const txtndx, if (w2(ehdr->e_machine) == EM_ARM && ELF_ST_TYPE(symp->st_info) == STT_FUNC) continue; + if (ELF_ST_TYPE(symp->st_info) == STT_SECTION) + continue; *recvalp = _w(symp->st_value); return symp - sym0;