site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Question 4: How does the mkext, if loaded separately, get linked to the kernel? (i.e. does the boot loader contain a linker that works like the kextcache command?) If the kernel contains a linker to link in the kexts, that means that it's also the kernel that initializes them, I suppose. Correct? However, on q 2 you replied that the bootloader parses kexts. What I haven't seen yet is the part that links the kexts (apparently loaded by the boot loader) to the kernel. Does the boot_args struct have a new parameter (not doc'd in Amit's book) which passes a pointer to a list of loaded kexts to the kernel, or how does this work? Background is this: It appears that a 3rd party boot loader is able to load two sets of kexts from different locations and get them used by the kernel. I try to understand how that works, because so far all I learned was that there's only one single group of kexts that the kernel sees, not several. --Nik _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... On 14 Jun, 2009, at 14:38, Thomas Tempelmann wrote: The kernel contains a linker that handles this. Perhaps there's some confusion over what you mean by "initialize" here. Initialization would be one step in loading a kext, which happens after linking. Again some confusion in terminology. The boot loader copies kexts into memory that the kernel knows how to find, it does not load kexts (in the sense of getting them actually running, as it does for the kernel). To "load a kext" is a pretty involved process, which varies between early boot and when kextd starts, of which linking is only a part. Shantonu's reference to the libsa/catalogue.cpp file definitely where you want to start. I have no idea what they are doing in their boot loader; as Shantonu said, you'll have to ask them. I'm a bit of a stickler on terminology as one of the implementers of the kext loading stack, and people often come to me with questions about many distinct things using the single word "load" for them all. :-) This email sent to site_archiver@lists.apple.com