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

From: Venki Pallipadi
Date: Thu May 01 2008 - 19:30:56 EST


On Thu, May 01, 2008 at 04:21:16PM -0700, Tom Rini wrote:
> On Thu, May 01, 2008 at 03:42:38PM -0700, Andrew Morton wrote:
>
> [snip]
> > Is there some vaguely maintainable workaround we can do? If the problem
> > only affects completely-empty weak functions then we could put something in
> > them to make them non-empty?
>
> My memory is a tiny bit hazy (it was a while ago), but no, it's not just
> empty functions (again, I _think_ I hit it with a generic vs arch weak
> function).
>

Other thing we observed was: this does not just depend on the __weak
function definition. It also depends on where the function is called from.

__weak function with single return statement, did not get inlined when called
from say

caller()
{
function();
}

but got inlined when called as in

caller()
{
for (;;) {
function();
}
}

Thanks,
Venki

--
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/