When loading kexts in PlatformDarwinKernel, we use the BundleID as the filename to to create shared modules. In GetSharedModule we call ExamineKextForMatchingUUID for any BundleID it finds that is a match, to see if the UUID is also a match. Until now we were using Host::ResolveExecutableInBundle whcih calls a CoreFoundation API to obtain the executable. However, it's possible that the executable has a variant suffix (e.g. foo_development) and these files were ignored.
This patch replaces that call with logic that looks for all the binaries in the bundle. Because of the way ExamineKextForMatchingUUID works, it's fine to try to load executables that are not valid and we can just iterate over the list until we found a match.