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

Linus Torvalds
2011-02-17T21:11:56Z

On Thu, Feb 17, 2011 at 1:01 PM, David Miller <davem@davemloft.net> 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