lkml.org 
[lkml]   [2024]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2024-03-18 16:55    [W:0.219 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site