On Mon, May 28, 2012 at 06:51:43AM -0700, Paul Goyette wrote:
I'm not sure this solves the problem.
From my earlier attempts at modularizing the ieee80211 code, it seems
that there are two separate mechanisms for finding the start and end of
a link set:
1. Within a monolithically-linked kernel, we have the symbols
__{start,stop}_link_set_* but no program section table
2. Within a module, we have the program section table (containing a
start address and size), but no symbols
Since the primary purpose of link_sets is to gather together some
unknown quantity of "info" from arbitrary contributors without imposing
any restrictions on quantity, I don't see how your proposal addresses
the need of figuring out the size/quantity portion of the equation.
If you look at (say) evcnt_init() is has:
__link_set_decl(evcnts, struct evcnt);
__link_set_foreach(evp, evcnts)
evcnt_attach_static(*evp);
If could also call something like:
__link_set_process(evcnts, evcnt_attach_static, evcnt_detach);
which would save data the module loader can use to process the program
section of a lodable module.