[coreboot] Drivers vs. Objects

Stefan Reinauer stepan at coresystems.de
Fri Sep 25 22:21:17 CEST 2009

Stefan Reinauer wrote:
> Peter Stuge wrote:
>> Myles Watson wrote:
>>> In what way is the ops struct phony?
>> The device can not be discovered so code must know that the device is
>> there, and if code does, the ops provide no benefit but add
>> confusion and undesirable indirection.
> Not really.. It does not make much sense to go away from an object
> oriented interface used for all other devices just because the one
> device can not be autodetected...

I think the deal is this:

drivers are not referenced. This means if they're part of an .a archive
they're dropped while linking.

That hurts for drivers, because they'd never end up in the image.

However, for objects we enjoy this optimization. If a .o file has no
used symbols, it will not end up in the binary. Saves us a few bytes at
every corner.


More information about the coreboot mailing list