tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Modularizing net80211 (was: link_set info needed)

On Sat, 28 Apr 2012, Joerg Sonnenberger wrote:

On Sat, Apr 28, 2012 at 05:09:16PM +0100, David Laight wrote:

This mechanism only works for modules that are "separate" from the
kernel (loaded via "boot" or from "filesys").  "builtin" modules still
need to use the link_set mechanism.

Shouldn't be that hard to put the contructor list address into a
link_set - that would make it easy to get them called for 'built in'

It's not even that complicated. Just provide symbols for start and end
of the .ctor / .dtor section. That can be done either using linker
scripts or by prepending / appending a small object like crt* does.

But can you provide symbols for the start/end of each module's portion of the .ctor / .dtor section? I don't think you can even guarantee that all contributions for a module would be co-located. And I don't think you would want to call all contructors for all (built-in) modules at the same time, so you'd need a way to identify which entries belong to each module. This is essentially what the link_set mechanism does today - the net80211 module (and other stuff) each gets its own .ctor section.

| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at |
| Kernel Developer |                          | pgoyette at  |

Home | Main Index | Thread Index | Old Index