In my OS, I use a custom section (.boot_init) with a list of function pointers to call on boot. All the drivers put their pointers into this section, and on the init routine it fires them all off in the early stages of the boot process.
This worked great until I decided to split the drivers off into a static library. It links fine, but I guess it doesn't think it needs that section because it silently drops it in the final (ELF) image. Is there some flag that will make it not get rid of these "unneeded" sections?
Thanks in advance