tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GPIO revisited



On Sat, Jul 25, 2009 at 12:53:45PM +0200, Marc Balmer wrote:
> 
> While it certainly can make sense to declare functions static in some  
> userland programs for the sole reason to include a command in a  
> crunched binary,

The cruncher hides symbols (by renaming them) so the above isn't true.

> it does not make sense in kernel code; much to the  
> contrary, it makes debugging harder.

I would have thought that it is particularly important in the kernel
due to the large number of disparate components that get linked together.

Non-static functions (and data) need to be given a namespace prefix
(it can be useful for statis ones as well) otherwise the linker
can, and will, do unwanted things.

I do tend to make functions whose address is passed out of the module
non-static, but that isn't necessary when (as is sensible) non-global
symbols aren't stripped from the symbol table.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index