Re: [PATCH] Generic dead function optimisation

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Fri Apr 21 2000 - 09:19:08 EST


Keith Owens wrote:
> Not to mention this case:
>
> static int do_something(void) {...}
> EXPORT_SYMBOL(do_something);
>
> Perfectly legal because of the way that the kernel handles exported
> symbols.

I would prefer that such a case be perfect illegal..

It may be legal because of the way the kernel handles exported symbols,
but it violates all traditional assumptions made about declaring a
symbol static -- fighting namespace pollution, making possible compiler
and linker optimizations, etc.

It violates the Principle of Least Surprise

        Jeff

-- 
Jeff Garzik              | Nothing cures insomnia like the
Building 1024            | realization that it's time to get up.
MandrakeSoft, Inc.       |        -- random fortune

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:19 EST