The second important idea here – module stacking – is what we will now delve further into.
Module stacking is a concept that provides a "library-like" feature to kernel module authors, to a degree. Here, we typically architect our project or product design in such a manner that we have one or more "core" kernel modules, whose job is to act as a library of sorts. It will include the data structures and functionality (functions/APIs) that will be exported to other kernel modules (the preceding section discussed the exporting of symbols).
To better understand this, let's look at a couple of real examples. To begin with, on my host system, an Ubuntu 18.04.3 LTS native Linux system, I ran a guest VM(s) over the Oracle VirtualBox 6.1 hypervisor application. Okay, performing a quick lsmod(8) on the host system while filtering for the string vbox reveals the following:
...