Messages in this thread | | | Date | Mon, 18 Mar 2024 11:58:02 -0400 | From | Steven Rostedt <> | 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@kernel.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
| |