Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
By adding a --whole-archive flag to the ld command, I made it include everything, but this is a kludge. I know now why it did this "optimization": The drivers are never called into by name. The function pointer gives the initilization routine the address, but ld has no way to assocate this to the symbol, so it thinks they're all unused. It's too smart for its own good
I'd like to have a better solution than what I did, maybe something to let it associate the pointer to the symbol?
That way, the pointer list gets wrapped up with the rest of the code. The problem was that since ld didn't think that those object files were being used, it thought it was safe to discard them (and with them went the .boot_init data). What it didn't realize was that those pointers were the entry point into the object files.