Re: [patch] 2.4.16 for pointers to __devexit functions

Jakub Jelinek
2001-12-06T09:51:25Z

On Thu, Dec 06, 2001 at 09:40:19AM +0000, David Woodhouse wrote:
>
> davem@redhat.com said:
> > > Why not __attribute__((weak)) ?
> > This doesn't work on all platforms unfortunately :(
>
> Doesn't work at all, or just doesn't work with the (current) minimum
> recommended compiler? We have to increase those minima at some point.

Actually, I think all GCCs will error on it, or at least should.
Most of the __devexit routines are static, you get something like:
test.c:2: weak declaration of `foo' must be public

It is very weird thing to have a non-public weak, and assemblers will do
weird things if you tweak it in assembly output.

Jakub