EXPORT_NO_SYMBOLS vs. (null) ?
What is the difference between a module that exports no symbols and includes EXPORT_NO_SYMBOLS reference, and such a module that lacks EXPORT_NO_SYMBOLS?
Alan once upbraided me for assuming they were the same :)
Signature · 7 lines
Jeff Garzik | Building 1024 | The chief enemy of creativity is "good" sense MandrakeSoft | -- Picasso - 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 · Jeff Garzik
What is the difference between a module that exports no symbols and includes
EXPORT_NO_SYMBOLSreference, and such a module that lacksEXPORT_NO_SYMBOLS?
When modules were first introduced, all symbols were automatically exported. For kernel 2.0 compatibility, a module without EXPORT_NO_SYMBOLS actually exports everything. There are flags on insmod to override this default. modutils 2.5 will remove this backwards compatibility, no module will export symbols unless they are explicitly exported. If you are feeling brave, add
insmod_opt=-x
to your modules.conf and see what breaks in 2.4.
-
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 5 lines
What is the difference between a module that exports no symbols and includes
EXPORT_NO_SYMBOLSreference, and such a module that lacksEXPORT_NO_SYMBOLS?Alan once upbraided me for assuming they were the same :)
EXPORT_NO_SYMBOLS - nothing exportedMODULE_foo - export specific symbol
none of the above, export all globals but without modvers
The behaviour may have changed with newer modutils, its originally there for compatibility in the earlier days of the module stuff
-
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 10 lines · Alan Cox
Quoted 5 lines
What is the difference between a module that exports no symbols and includes
EXPORT_NO_SYMBOLSreference, and such a module that lacksEXPORT_NO_SYMBOLS?Alan once upbraided me for assuming they were the same :)
EXPORT_NO_SYMBOLS- nothing exportedMODULE_foo- export specific symbolnone of the above, export all globals but without modvers
^^^^^^^ and statics!!!!
I consider that a bug, but...
Roger.
Signature · 8 lines
** [email protected] ** http://www.BitWizard.nl/ ** +31-15-2137555 ** *-- BitWizard writes Linux device drivers for any device you may have! --* * There are old pilots, and there are bold pilots. * There are also old, bald pilots. - 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 8 lines · Rogier Wolff
Quoted 6 lines · Alan Cox
Quoted 5 lines
What is the difference between a module that exports no symbols and includes
EXPORT_NO_SYMBOLSreference, and such a module that lacksEXPORT_NO_SYMBOLS?Alan once upbraided me for assuming they were the same :)
Quoted 7 lines
Quoted 4 lines
EXPORT_NO_SYMBOLS - nothing exported MODULE_foo - export specific symbolnone of the above, export all globals but without modvers
^^^^^^^ and statics!!!!I consider that a bug, but...
eh? Can you give an example of this? This should definitely -not- be the case.
Jeff
Signature · 7 lines
Jeff Garzik | Building 1024 | The chief enemy of creativity is "good" sense MandrakeSoft | -- Picasso - 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 12 lines · Jeff Garzik
Quoted 11 lines · Rogier Wolff
Quoted 9 lines · Alan Cox
Quoted 5 lines
What is the difference between a module that exports no symbols and includes
EXPORT_NO_SYMBOLSreference, and such a module that lacksEXPORT_NO_SYMBOLS?Alan once upbraided me for assuming they were the same :)
EXPORT_NO_SYMBOLS - nothing exported MODULE_foo - export specific symbol
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
none of the above, export all globals but without modvers
^^^^^^^ and statics!!!!I consider that a bug, but...
eh? Can you give an example of this? This should definitely -not- be the case.
Compile a kernel, marking "sx" and "riscom8" as modules.
Install, modprobe sx, and voila, you'll pull in the riscom because its "block_til_ready" static was found to satisfy the block_til_ready from generic_serial.
We're working on renaming the one in generic_serial to "gs_block_til_ready", but haven't checked yet if the patch got applied. So you may have to use a "month-old" kernel for this test.
Roger.
Signature · 8 lines
** [email protected] ** http://www.BitWizard.nl/ ** +31-15-2137555 ** *-- BitWizard writes Linux device drivers for any device you may have! --* * There are old pilots, and there are bold pilots. * There are also old, bald pilots. - 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 19 lines · Rogier Wolff
Quoted 17 lines · Jeff Garzik
Quoted 15 lines · Rogier Wolff
Quoted 10 lines · Alan Cox
Quoted 5 lines
What is the difference between a module that exports no symbols and includes
EXPORT_NO_SYMBOLSreference, and such a module that lacksEXPORT_NO_SYMBOLS?Alan once upbraided me for assuming they were the same :)
EXPORT_NO_SYMBOLS - nothing exported MODULE_foo - export specific symbolnone of the above, export all globals but without modvers
^^^^^^^ and statics!!!!I consider that a bug, but...
Quoted 8 lines
Quoted 2 lines
eh? Can you give an example of this? This should definitely -not- be the case.
Compile a kernel, marking "sx" and "riscom8" as modules.
Install, modprobe sx, and voila, you'll pull in the riscom because its "
block_til_ready" static was found to satisfy theblock_til_readyfromgeneric_serial.
That doesn't imply that statics are being exported as symbols. generic_serial had no EXPORT_xxx markers, and block_til_ready was public, so it was expected behavior for g_s to export b_t_r as a symbol.
It is strange that a static which exists in riscom8 causes another module which exports the same symbol to be pulled in.
Quoted 3 lines
We're working on renaming the one in
generic_serialto "gs_block_til_ready", but haven't checked yet if the patch got applied. So you may have to use a "month-old" kernel for this test.
Can this function be made static? It looks like many drivers define it themselves..
In any case, you have a patch coming to you [offline] cleaning up the sx and riscom8 namespaces...
Jeff
Signature · 7 lines
Jeff Garzik | Building 1024 | The chief enemy of creativity is "good" sense MandrakeSoft | -- Picasso - 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 5 lines · On Sat, 18 Nov 2000 18:50:00 +0100 (MET), [email protected] (Rogier…
Compile a kernel, marking "sx" and "riscom8" as modules.
Install, modprobe sx, and voila, you'll pull in the riscom because its "
block_til_ready" static was found to satisfy theblock_til_readyfromgeneric_serial.
If that is true then it is a bug in either depmod or modprobe. However I cannot reproduce it using kernel 2.4.0-test11-pre7 and modutils 2.3.20. In particular depmod correctly recognises that sx depends on block_til_ready in generic_serial, not in riscom. Which kernel, which modutils, which .config?
-
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/