Hooks The simple solution to the above problem is hooks Every driver that would not be pulled-on by the linker has a hook symbol Some relevant code refers to the hook (main, or setup.c) We waste at least one byte per driver, but it may be acceptable By referring to the hook, you claim your need for the code if (CONFIG_HAS_USB || CONFIG_PLL_CPU > 1) pll_hook = 1; A more structured operating system may be hook-based If drivers have standard operations and you open them by name You would implement an "import" or "use" mechanism like this This is what BertOS was doing, for example It is a library-based OS building multiple applications Each application requests its own feature-set Then, the match at run-time is name-based