Chameleon

Chameleon Commit Details

Date:2011-05-11 20:11:11 (12 years 11 months ago)
Author:Evan Lojewski
Commit:797
Parents: 796
Message:Ugly hack for xcode 4 + module support
Changes:
M/trunk/i386/boot2/modules.c

File differences

trunk/i386/boot2/modules.c
6262
6363
6464
65
66
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
6784
6885
6986
......
318335
319336
320337
321
322
338
339
323340
324341
325342
}
else
{
// The module does not have a valid start function
printf("Unable to start %s\n", SYMBOLS_MODULE); getc();
module_data -= 0x10; // XCODE 4 HACK
module_start = parse_mach(module_data, &load_module, &add_symbol);
if(module_start && module_start != (void*)0xFFFFFFFF)
{
// Notify the system that it was laoded
module_loaded(SYMBOLS_MODULE /*moduleName, moduleVersion, moduleCompat*/);
(*module_start)();// Start the module. This will point to load_all_modules due to the way the dylib was constructed.
execute_hook("ModulesLoaded", NULL, NULL, NULL, NULL);
DBG("Module %s Loaded.\n", SYMBOLS_MODULE);
retVal = 1;
}
else
{
// The module does not have a valid start function
printf("Unable to start %s\n", SYMBOLS_MODULE); getc();
}
}
}
return retVal;
}
else
{
printf("Invalid mach magic 0x%X\n", ((struct mach_header*)binary)->magic);
getc();
verbose("Invalid mach magic 0x%X\n", ((struct mach_header*)binary)->magic);
//getc();
return NULL;
}

Archive Download the corresponding diff file

Revision: 797