Ok, I did that before, I'll change it back.
Note that the reference counting isn't perfect when it comes to catching
mistakes.
The fundamental problem is that when a module is loaded and linked, all the
modules that it used symbols from gain a "use". To be symmetric, when a
module is unloaded all the modules it used symbols from should lose a
"use". Except, there is no record of what modules gained a "use" at link
time. Suppose module 1 uses a symbol from module 2. At link time, a
module_use that "1 uses 2" is created. Now say 1 does a symbol_put() on
something in 2, with no matching get. The "1 uses 2" goes away. When 1 is
unloaded, there is no way to tell that "1 uses 2", deleted by the extra
put, is missing.
If it's wanted, I think I could fix this. I'd have a separate count of
static uses vs dynamic uses.