Messages in this thread | | | Date | Fri, 02 May 2008 15:02:43 -0700 (PDT) | Subject | Re: huge gcc 4.1.{0,1} __weak problem | From | David Miller <> |
| |
From: Jeremy Fitzhardinge <jeremy@goop.org> Date: Fri, 02 May 2008 14:11:18 -0700
> Suresh Siddha wrote: > > On Thu, May 01, 2008 at 05:34:34PM -0700, Linus Torvalds wrote: > > > >> Is it always about inlining? If so, can't we add a __noinline__ to the > >> declaration of __weak? > >> > > > > We tried that and it was still getting inlined. > > That's a pity. I've worked around this bug with noinline before.
It's "constness", as Jakub mentioned, not inlineability, that triggers this bug.
That's why his workaround of using an empty asm("") to the function is an effective workaround, because the compiler can no longer internally decide that the function is "const".
| |