Chameleon

Chameleon Commit Details

Date:2011-02-09 06:14:32 (9 years 3 months ago)
Author:Evan Lojewski
Commit:737
Parents: 736
Message:Assume module system is compiled in. If not, don't start it. Fixed potential bug from prev commit.
Changes:
M/branches/meklort/i386/boot2/modules.c

File differences

branches/meklort/i386/boot2/modules.c
11
22
33
4
54
65
76
......
4645
4746
4847
49
50
51
52
53
54
55
56
57
58
59
48
6049
6150
6251
......
6554
6655
6756
68
69
7057
7158
7259
7360
7461
62
7563
64
7665
77
66
7867
79
68
69
8070
8171
8272
/*
* Copyright 2010 Evan Lojewski. All rights reserved.
*
* TODO: Zero out bss if needed
*/
#ifndef DEBUG_MODULES
#define DEBUG_MODULES 0
// Intialize module system
if(symbols_module_start == (void*)0xFFFFFFFF)
{
DBG("Module system not compiled in.\n"); DBGPAUSE();
load_module(SYMBOLS_MODULE);
lookup_symbol = (void*)lookup_all_symbols(SYMBOL_LOOKUP_SYMBOL);
if((UInt32)lookup_symbol != 0xFFFFFFFF)
{
return 1;
}
return 0;
return 0;// Module system (Symbols.dylib) was not compiled in
}
module_start = parse_mach(module_data, &load_module, &add_symbol);
{
// Notify the system that it was laoded
module_loaded(SYMBOLS_MODULE /*moduleName, moduleVersion, moduleCompat*/);
(*module_start)();// Start the module
DBG("Module %s Loaded.\n", SYMBOLS_MODULE);
lookup_symbol = (void*)lookup_all_symbols(SYMBOL_LOOKUP_SYMBOL);
if((UInt32)lookup_symbol != 0xFFFFFFFF)
{
(*module_start)();// Start the module
execute_hook("ModulesLoaded", NULL, NULL, NULL, NULL);
DBG("Module %s Loaded.\n", SYMBOLS_MODULE);
return 1;
}
}
}
else {
else
{
// The module does not have a valid start function
printf("Unable to start %s\n", SYMBOLS_MODULE); getc();
}

Archive Download the corresponding diff file

Revision: 737