removal of "static foo = 0" from drivers/ide (test11)
Quoted 3 lines · Russell King
The only difference is the size on disk; if we go around setting every bss variable to zero, the kernel/module data size will unnecessarily huge.
Hmm, what about common symbol generation? i.e. the linker looses the ability
to throw out "multiply defined symbol" errors where you fail to initialise it
to a value.
Okay extern global variables in the kernel need to be controlled and it is not
like many get added, however it is possible that one developer may never know
it is already in use by another part of the kernel, when their oh-no-new driver
is added. Since the linkers assistance in this issue has just been disabled.
Is 'gas' able to be configured to never emit common symbols, but emit BBS
symbols instead, or is 'ld' able to be configured to never merge common symbols but throw up "multiply defined symbol" errors. Then everyone is safe.
Quoted 3 lines
We already argue about the extra couple of bytes that xx change to the kernel/a module would cost. With these change, we save kilo-bytes in disk space (which is important on some systems).
PDAs!!! :) Excellent work Russell.
Signature · 5 lines
Darryl Miles - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] Please read the FAQ at http://www.tux.org/lkml/
Quoted 3 lines · Darryl Miles
Hmm, what about common symbol generation? i.e. the linker looses the ability to throw out "multiply defined symbol" errors where you fail to initialise it to a value.
We need to build with -fno-common to be 100% safe in this case. I'll run several compilations with this flag tomorrow.
Quoted 5 lines
Quoted 3 lines
We already argue about the extra couple of bytes that xx change to the kernel/a module would cost. With these change, we save kilo-bytes in disk space (which is important on some systems).
PDAs!!! :) Excellent work Russell.
Note that this only affects the storage; the run-time size is exactly the same in both cases. I hope my comment above was clear about that.
_____
|_____| ------------------------------------------------- ---+---+- | | Russell King [email protected] --- --- | | | | http://www.arm.linux.org.uk/personal/aboutme.html / / | | +-+-+ --- -+- / | THE developer of ARM Linux |+| /|\ / | | | --- | +-+-+ ------------------------------------------------- /\\\ |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/