Messages in this thread | | | Subject | Re: [PATCH] kill symbol_get & friends | From | Rusty Russell <> | Date | Thu, 13 Jan 2005 13:25:47 +1100 |
| |
On Thu, 2005-01-13 at 11:59 +1100, Dave Airlie wrote: > > For optional module dependencies, weak symbols can be used, but there > > seems to be a desire for genuine dynamic dependencies. If you can get > > rid of those, I'll apply your patch in a second! > > what weak symbol support? can I actually use gcc weak symbols and have > it all work? > what happens if the module goes away?
1) See kernel/module.c:1156 ("/* OK if weak. */").
2) Weak undefined symbols should "just work". Overriding of weak defined symbols is not implemented: noone has asked.
3) Like any statically-resolved symbol, this module will hold a reference to the module exporting the symbol. The only special thing about weak symbols is that we don't fail to load if they are unresolved (and the address will be NULL in this case).
Hope that clarifies, Rusty. -- A bad analogy is like a leaky screwdriver -- Richard Braakman
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |