OcAppleKernelLib: Rebuild KC when no kexts are injected
Fixes an issue where __PRELINK_INFO (first segment) is relocated and thus renders relocations invalid (relative to the first segment's VA)
@@ -224,10 +224,6 @@ KcRebuildMachHeader (
return EFI_INVALID_PARAMETER;
}
- if (FilesetSize == 0) {
- return EFI_SUCCESS; ///< Just in case.
- }
-
if (CurrentSize + RequiredSize > TextSegment->FileSize) {
//
// We do not have enough memory in the header, free some memory by merging
