Re: [PATCH 1/3] module: deal with alignment issues in built-in module versions

From: Linus Torvalds
Date: Thu Feb 17 2011 - 16:20:22 EST


On Thu, Feb 17, 2011 at 1:01 PM, David Miller <davem@xxxxxxxxxxxxx> wrote:
>
> GCC is very clever with "static" objects these days.

I'm sorry, but that simply isn't an acceptable excuse.

The thing is, we DO THIS THING ALL OVER. And the trick used in the
original thing (to just turn it into a pointer array instead) _also_
does it. It just happens to do it with a pointer instead of a struct.

So no, I will not take this piece-of-crap patch based on "gcc is
trying to be clever, but we can work around it by doing the same thing
except now we take the drugs".

That's just stupid.

And I'm scared to see that you have apparently fed those drugs to the
perf tree too.

EVERY SINGLE OF YOUR ARGUMENTS WORK FOR "pointer" TOO! It's pure
happenstance that gcc doesn't decide to do clever things with them. So
replacing that array of structs with array-of-pointers is just voodoo
programming.

What is the crap-for-brains thing that gcc actually does, and how can
we fix it _properly_ without this kind of voodoo?

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