Re: huge gcc 4.1.{0,1} __weak problem

From: David Miller
Date: Fri May 02 2008 - 18:02:55 EST


From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
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".
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/