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=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 4F1B2C433E0 for ; Sat, 13 Feb 2021 14:10:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1AB3764E50 for ; Sat, 13 Feb 2021 14:10:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229710AbhBMOJs (ORCPT ); Sat, 13 Feb 2021 09:09:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:42868 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229584AbhBMOJq (ORCPT ); Sat, 13 Feb 2021 09:09:46 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D315264DEB; Sat, 13 Feb 2021 14:09:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613225345; bh=pTRlgXkyhIUDcjvu3VK/6FMuyvV971qckI4/kaJRXvg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=f6LKUDOl0e+B22x558Jcdkhmwp7xy8eK5tJ+wGVckiBrI1+DSzXRFbH22Oy8rmglZ Kmqfygd8myp8NyLSIz0FSTsTi5zm5xUXj38DGahvvY13nCzgyEyaIGB8PltPvGNPzJ 7UE0nQTWVFEiaPuKLYwgiW14X8TQ5Z9r8CGaAPiA= Date: Sat, 13 Feb 2021 15:09:02 +0100 From: Greg Kroah-Hartman To: Steven Rostedt Cc: Josh Poimboeuf , 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: References: <160812658044.3364.4188208281079332844.tip-bot2@tip-bot2> <20210212170750.y7xtitigfqzpchqd@treble> <20210212124547.1dcf067e@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210212124547.1dcf067e@gandalf.local.home> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 12, 2021 at 12:45:47PM -0500, Steven Rostedt wrote: > 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; > Thanks for the patch, but no, still fails with: Cannot find symbol for section 8: .text.unlikely. kernel/kexec_file.o: failed make[1]: *** [scripts/Makefile.build:277: kernel/kexec_file.o] Error 1 make[1]: *** Deleting file 'kernel/kexec_file.o'