[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240318115802.39f89b73@gandalf.local.home>
Date: Mon, 18 Mar 2024 11:58:02 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>, x86@...nel.org,
linux-kernel@...r.kernel.org, Peter Zijlstra <peterz@...radead.org>, Vince
Weaver <vincent.weaver@...ne.edu>, Dave Jones <dsj@...com>, Jann Horn
<jannh@...gle.com>, Miroslav Benes <mbenes@...e.cz>, Andy Lutomirski
<luto@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, Masami Hiramatsu
<mhiramat@...nel.org>, Nilay Vaish <nilayvaish@...gle.com>
Subject: Re: [PATCH v2 06/11] x86/unwind/orc: Convert global variables to
static
On Wed, 28 Feb 2024 16:42:52 -0800
Josh Poimboeuf <jpoimboe@...nel.org> wrote:
> > I'm guessing because we don't have the full dwarf info?
>
> DWARF isn't needed for that. Even the symbol table has it (as does
> System.map). For both globals and statics.
It is in System.map, but I guess the real issue is that the compiler can
optimize it out. That is, the number is never set as it is static and the
compiler doesn't need to do anything to make it valid. To the compiler, the
number is just a local variable. I'm not exactly sure how it does that, as
it sets the value in one function and uses it in another. But clang appears
to not be setting it when it is static.
Either removing static or making it volatile makes it work again.
Thoughts?
-- Steve
Powered by blists - more mailing lists