Re: [tip: objtool/urgent] objtool: Fix seg fault with Clang non-section symbols
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [tip: objtool/urgent] objtool: Fix seg fault with Clang non-section symbols
- From: Steven Rostedt <rostedt@xxxxxxxxxxx>
- Date: Fri, 12 Feb 2021 12:45:47 -0500
- Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Nick Desaulniers <ndesaulniers@xxxxxxxxxx>, Xi Ruoyao <xry111@xxxxxxxxxxxxxxxx>, "# 3.4.x" <stable@xxxxxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxxxx>, "Peter Zijlstra (Intel)" <peterz@xxxxxxxxxxxxx>, Miroslav Benes <mbenes@xxxxxxx>, "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@xxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, linux-tip-commits@xxxxxxxxxxxxxxx
- In-reply-to: <20210212170750.y7xtitigfqzpchqd@treble>
- References: <ba6b6c0f0dd5acbba66e403955a967d9fdd1726a.1607983452.git.jpoimboe@redhat.com> <160812658044.3364.4188208281079332844.tip-bot2@tip-bot2> <dded80b60d9136ea90987516c28f93273385651f.camel@mengyan1223.wang> <YCU3Vdoqd+EI+zpv@kroah.com> <CAKwvOd=GHdkvAU3u6ROSgtGqC_wrkXo8siL1nZHE-qsqSx0gsw@mail.gmail.com> <YCafKVSTX9MxDBMd@kroah.com> <20210212170750.y7xtitigfqzpchqd@treble>
On Fri, 12 Feb 2021 11:07:50 -0600
Josh Poimboeuf <jpoimboe@xxxxxxxxxx> 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;
[Index of Archives]
[Linux Stable Commits]
[Linux Stable Kernel]
[Linux Kernel]
[Linux USB Devel]
[Linux Video &Media]
[Linux Audio Users]
[Yosemite News]
[Linux SCSI]