Changeset 732 for Whitix/branches

Show
Ignore:
Timestamp:
07/06/08 12:20:02 (5 months ago)
Author:
mwhitworth
Message:

Update fs branch with recent changes.

Location:
Whitix/branches/fs
Files:
1 removed
3 modified

Legend:

Unmodified
Added
Removed
  • Whitix/branches/fs/devices/misc/Makefile

    r708 r732  
    55 
    66modules_install: 
    7         cp misc.sys ../../CdRoot/System/Modules/Unix 
     7        cp misc.sys ../../CdRoot/System/Modules/Core 
    88 
    99include $(DEPTH)make.inc 
  • Whitix/branches/fs/include/elf.h

    r608 r732  
    9595#define SEC_TYPE_SYMTAB         2 
    9696#define SEC_TYPE_STRTAB         3 
     97#define SEC_TYPE_RELA           4 
    9798#define SEC_TYPE_NOBITS         8 
    9899#define SEC_TYPE_REL            9 
  • Whitix/branches/fs/kernel/module.c

    r652 r732  
    226226        DWORD relSize=module->sectionHeaders[sec].shSize/sizeof(struct ElfReloc); 
    227227 
     228        if (!module->sectionHeaders[ module->sectionHeaders[sec].shInfo ].shAddr) 
     229                return; 
     230 
    228231        for (i=0; i<relSize; i++) 
    229232        { 
     
    354357                        /* Resolve entries in the module. */ 
    355358                        ModuleSymbolResolve(module, file, i); 
     359                else if (sectionHeaders[i].shType == SEC_TYPE_RELA) 
     360                        KePrint("RELA\n"); 
    356361        } 
    357362 
     
    368373        module->keSymTab=ModuleSectionFind(module, (char*)file+sectionHeaders[elfHeader->strTabSectionIndex].shOffset, ".symtable", elfHeader->shEntries, &module->keSymTabSize); 
    369374 
    370         SpinLock(&moduleListLock); 
    371375        ListAdd(&module->next, &moduleList); 
    372         SpinUnlock(&moduleListLock); 
    373376 
    374377        return ret; 
     
    398401                void* kData=(void*)VirtMapPhysRange(MODULE_START, MODULE_END, PAGE_ALIGN_UP(*length) >> PAGE_SHIFT, 3); 
    399402                char buf[32]; 
    400  
    401403                int j=0; 
    402404 
     
    409411                strcat(buf, ".sys"); 
    410412 
     413                KePrint("length = %#X: ", *length); 
     414 
    411415                if (ModuleAdd(data, kData, *length, 0)) 
    412416                        KernelPanic("Could not initialize the kernel"); 
     
    428432{ 
    429433        void* kData; 
     434        int ret; 
     435 
     436        SpinLock(&moduleListLock); 
    430437 
    431438        /* Check data is ok to access. */ 
    432439        kData=(void*)VirtMapPhysRange(MODULE_START, MODULE_END, PAGE_ALIGN_UP(length) >> PAGE_SHIFT, 3); 
    433440 
    434         return ModuleAdd(data, kData, length, 0); 
     441        ret=ModuleAdd(data, kData, length, 0); 
     442        SpinUnlock(&moduleListLock); 
     443 
     444        return ret; 
    435445} 
    436446